[FFmpeg-devel] [PATCH]Fix for issue694. Dirac A/V sync loss

Anuradha Suraparaju anuradha
Sat Dec 20 03:30:40 CET 2008


Hi,

On Fri, 2008-12-19 at 10:55 +0100, Diego Biurrun wrote:
> On Fri, Dec 05, 2008 at 02:18:47PM +1100, Anuradha Suraparaju wrote:
> > 
> > I've attached a modified patch to this email.
> 
> I was about to apply this, but noticed a bunch of cosmetic issues that
> I was too lazy to fix myself:
> 
> > --- libavcodec/dirac_parser.c	(revision 16006)
> > +++ libavcodec/dirac_parser.c	(working copy)
> > @@ -34,42 +35,200 @@
> > +static int unpack_parse_unit(DiracParseUnit *pu, DiracParseContext *pc,
> > +                              int offset)
> 
> one space too much
> 

Fixed.

> > +static int dirac_combine_frame(AVCodecParserContext *s, AVCodecContext *avctx,
> > +                                int next, const uint8_t **buf, int *buf_size)
> 
> ditto
> 

Fixed.

> > +    int parse_timing_info =
> > +                    (s->pts == AV_NOPTS_VALUE &&s->dts == AV_NOPTS_VALUE);
> 
> This would look nicer if you split the line at the &&.
> 

Done.

> > +        memcpy(pc->buffer, pc->buffer + pc->overread_index,
> > +                pc->index - pc->overread_index);
> 
> one space too much
> 

Fixed.

> > +        void *new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size,
> > +                              pc->index + (*buf_size - pc->sync_offset));
> 
> weird indentation
> 

Changed indentation.

> > +        pc->buffer = new_buffer;
> > +        memcpy(pc->buffer+pc->index, (*buf + pc->sync_offset),
> > +                *buf_size - pc->sync_offset);
> 
> ditto
> 

Fixed.

> > +        DiracParseUnit pu1, pu;
> > +        void *new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size,
> > +                                            pc->index + next);
> 
> another extra space
> 

Fixed. 

> Diego

I've attached the modified patch to this email. I am on holiday until
the start of the new year and won't have access to work email during my
break. So any more fixes, if needed, will be delayed.

Regards,
Anuradha 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: issue694_libdirac_libschroedinger_svn_16243.diff
Type: text/x-patch
Size: 9775 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081220/b9c42b68/attachment.bin>



More information about the ffmpeg-devel mailing list