[FFmpeg-devel] [PATCH] dvbsub fix transcoding

Michael Niedermayer michaelni at gmx.at
Sun Jun 22 21:17:04 CEST 2014


On Sun, Jun 22, 2014 at 11:46:24PM +0530, Anshul Maheshwari wrote:
> 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

>  ffmpeg.c               |    2 +
>  libavcodec/dvbsubdec.c |   59 +++++++++++++++++++++++++++++++++++++------------
>  2 files changed, 47 insertions(+), 14 deletions(-)
> 73829efda6166aaf7055905eeaddcc13d020a516  0001-fix-transcoding-dvbsub-to-dvbsub.patch
> From c4cc1d8d75be0ec2c94d0eb7acb78e12c1d5519e Mon Sep 17 00:00:00 2001
> From: Anshul Maheshwari <anshul.ffmpeg at gmail.com>
> Date: Sun, 22 Jun 2014 12:54:33 +0530
> Subject: [PATCH] fix transcoding dvbsub to dvbsub

applied

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140622/63b86535/attachment.asc>


More information about the ffmpeg-devel mailing list