dvbsub: fix encoding of termination packets.
The old code generates a termination packet with the same regions as the start packet and page_state set to "only what changed"; the result is that the termination packet is decoded as identical to the start packet. The new code does as found in some DVB broadcasts: produce a packet with no regions. This is done by expecting num_rects to be 0 rather than using a flip-flop. ffmpeg.c is updated accordingly.
This commit is contained in:
2
ffmpeg.c
2
ffmpeg.c
@@ -703,6 +703,8 @@ static void do_subtitle_out(AVFormatContext *s,
|
||||
sub->pts += av_rescale_q(sub->start_display_time, (AVRational){ 1, 1000 }, AV_TIME_BASE_Q);
|
||||
sub->end_display_time -= sub->start_display_time;
|
||||
sub->start_display_time = 0;
|
||||
if (i == 1)
|
||||
sub->num_rects = 0;
|
||||
subtitle_out_size = avcodec_encode_subtitle(enc, subtitle_out,
|
||||
subtitle_out_max_size, sub);
|
||||
if (subtitle_out_size < 0) {
|
||||
|
Reference in New Issue
Block a user