[FFmpeg-devel] [PATCHv3 3/6] dvbsubdec: always return the whole buffer as consumed bytes

JULIAN GARDNER joolzg at btinternet.com
Tue Oct 15 08:02:14 CEST 2013








>________________________________
> From: Clément Bœsch <u at pkh.me>
>To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org> 
>Sent: Tuesday, 15 October 2013, 7:53
>Subject: Re: [FFmpeg-devel] [PATCHv3 3/6] dvbsubdec: always return the whole buffer as consumed bytes
> 
>
>On Sun, Oct 06, 2013 at 09:14:12PM +0200, Marton Balint wrote:
>> We don't want leftover junk bytes to be accidentally feeded to us again. Also
>> show the number of skipped bytes in the debug output.
>> 
>> Signed-off-by: Marton Balint <cus at passwd.hu>
>> ---
>>  libavcodec/dvbsubdec.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>> 
>> diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
>> index 4ce40aa..9754179 100644
>> --- a/libavcodec/dvbsubdec.c
>> +++ b/libavcodec/dvbsubdec.c
>> @@ -1538,7 +1538,10 @@ static int dvbsub_decode(AVCodecContext *avctx,
>>      if (got_segment == 15 && sub)
>>          *data_size = dvbsub_display_end_segment(avctx, p, 0, sub);
>>  
>> -    return p - buf;
>> +    if (p - buf < buf_size)
>> +        av_log(avctx, AV_LOG_DEBUG, "skipping %d leftover junk bytes\n", buf_size - (int)(p - buf));
>> +
>> +    return buf_size;
>>  }
>
>Any idea what those junk bytes are? Maybe empty packets to stop previous
>sub presentation?
>
>-- 
>Clément B.
>
>_______________________________________________
>ffmpeg-devel mailing list
>ffmpeg-devel at ffmpeg.org
>http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

Before adding this patch, which i dont think is needed, where is the sample Ts stream that has this problem so we can find our what is the real cause as the pes stream shoud NOT have any trailing data.

Remember the implementation of DVB subs cheats in the removal cases as it does not use a real timer and/or the empty dvb subs packets.

If you have a TS that is showing extraneous chars can i get a copy to chkeck why

joolz



More information about the ffmpeg-devel mailing list