[FFmpeg-devel] [PATCH] dvbsub fix transcoding

Anshul Maheshwari anshul.ffmpeg at gmail.com
Sun Jun 22 20:16:24 CEST 2014


On Sun, Jun 22, 2014 at 10:00 PM, Michael Niedermayer <michaelni at gmx.at>
wrote:

> On Sun, Jun 22, 2014 at 09:13:45PM +0530, Anshul Maheshwari wrote:> @@
> -786,6 +795,10 @@ static void save_subtitle_set(AVCodecContext *avctx,
> AVSubtitle *sub)
> >      }
> >
> >      if (sub->num_rects > 0) {
> > +        if(ctx->compute_edt == 1 && ctx->prev_start != AV_NOPTS_VALUE) {
> > +            sub->end_display_time = av_rescale_q((sub->pts -
> ctx->prev_start ), AV_TIME_BASE_Q, (AVRational){ 1, 1000 }) - 1;
> > +            *got_output = 1;
> > +        }
>
> this seems to be the only place that sets got_output to 1
> and its only executed when compute_edt == 1
> so compute_edt == 0 would never return anything i suspect
>
> Yes, I was testing using ffplay instead of ./ffplay for comput_edt = 0
done. but I have changed the past behavior now got_output is set when
we have sub->rect > 0 . I am unable to think use of 0 rectangle in output.

> > +    if(ret < 0) {
> > +        *data_size = 0;
> > +        avsubtitle_free(sub);
> > +        return -1;
>
> i am not sure this is neccesary
>
there are chances while ret < 0 and sub->rects are malloced this will lead
memory leakage and faulty request for sample.


> but ret should be passed through and not replaced by -1 at least
>
> done.

-Anshul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-transcoding-dvbsub-to-dvbsub.patch
Type: text/x-patch
Size: 7658 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140622/e36f91d4/attachment.bin>


More information about the ffmpeg-devel mailing list