mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
gui/movieplayer.cpp: fix ass subtitles from newer ffmpeg versions, try to PGS subtitle hide
Origin commit data
------------------
Branch: ni/coolstream
Commit: 3b93336ed3
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2015-05-07 (Thu, 07 May 2015)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -28,6 +28,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define __STDC_CONSTANT_MACROS
|
#define __STDC_CONSTANT_MACROS
|
||||||
|
#define __STDC_LIMIT_MACROS
|
||||||
|
#include <stdint.h>
|
||||||
#include <global.h>
|
#include <global.h>
|
||||||
#include <neutrino.h>
|
#include <neutrino.h>
|
||||||
|
|
||||||
@@ -1783,9 +1785,10 @@ void CMoviePlayerGui::showSubtitle(neutrino_msg_data_t data)
|
|||||||
AVSubtitle * sub = (AVSubtitle *) data;
|
AVSubtitle * sub = (AVSubtitle *) data;
|
||||||
|
|
||||||
printf("************************* EVT_SUBT_MESSAGE: num_rects %d fmt %d *************************\n", sub->num_rects, sub->format);
|
printf("************************* EVT_SUBT_MESSAGE: num_rects %d fmt %d *************************\n", sub->num_rects, sub->format);
|
||||||
|
#if 0
|
||||||
if (!sub->num_rects)
|
if (!sub->num_rects)
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
if (sub->format == 0) {
|
if (sub->format == 0) {
|
||||||
int xres = 0, yres = 0, framerate;
|
int xres = 0, yres = 0, framerate;
|
||||||
videoDecoder->getPictureInfo(xres, yres, framerate);
|
videoDecoder->getPictureInfo(xres, yres, framerate);
|
||||||
@@ -1817,7 +1820,13 @@ void CMoviePlayerGui::showSubtitle(neutrino_msg_data_t data)
|
|||||||
min_y = std::min(min_y, yoff);
|
min_y = std::min(min_y, yoff);
|
||||||
max_y = std::max(max_y, yoff + nh);
|
max_y = std::max(max_y, yoff + nh);
|
||||||
}
|
}
|
||||||
end_time = sub->end_display_time + time_monotonic_ms();
|
|
||||||
|
//end_time = sub->end_display_time + time_monotonic_ms();
|
||||||
|
end_time = 10*1000;
|
||||||
|
if (sub->end_display_time != UINT32_MAX)
|
||||||
|
end_time = sub->end_display_time;
|
||||||
|
end_time += time_monotonic_ms();
|
||||||
|
|
||||||
avsubtitle_free(sub);
|
avsubtitle_free(sub);
|
||||||
delete sub;
|
delete sub;
|
||||||
return;
|
return;
|
||||||
@@ -1834,7 +1843,11 @@ void CMoviePlayerGui::showSubtitle(neutrino_msg_data_t data)
|
|||||||
int len = strlen(txt);
|
int len = strlen(txt);
|
||||||
if (len > 10 && memcmp(txt, "Dialogue: ", 10) == 0) {
|
if (len > 10 && memcmp(txt, "Dialogue: ", 10) == 0) {
|
||||||
char* p = txt;
|
char* p = txt;
|
||||||
|
#if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(55, 69, 100)
|
||||||
int skip_commas = 4;
|
int skip_commas = 4;
|
||||||
|
#else
|
||||||
|
int skip_commas = 9;
|
||||||
|
#endif
|
||||||
/* skip ass times */
|
/* skip ass times */
|
||||||
for (int j = 0; j < skip_commas && *p != '\0'; p++)
|
for (int j = 0; j < skip_commas && *p != '\0'; p++)
|
||||||
if (*p == ',')
|
if (*p == ',')
|
||||||
|
Reference in New Issue
Block a user