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

Anuradha Suraparaju anuradha
Fri Dec 5 04:18:47 CET 2008


Hi,

On Thu, 2008-12-04 at 09:29 +0100, Diego Biurrun wrote:
> On Thu, Dec 04, 2008 at 04:04:40PM +1100, Anuradha Suraparaju wrote:
> > 
> > I've attached a new patch with the changes.
> > 
> > --- libavcodec/dirac_parser.c	(revision 16001)
> > +++ libavcodec/dirac_parser.c	(working copy)
> >  
> > +    if (!pc->is_synced) {
> > +        for (i = 0; i < buf_size; i++) {
> > +            state = (state << 8) | buf[i];
> > +            if (state == DIRAC_PARSE_INFO_PREFIX) {
> > +                pc->is_synced = 1;
> > +                state = -1;
> > +                pc->header_bytes_needed = 9;
> > +                pc->sync_offset = i;
> 
> nit: This could be aligned.
> 

Done.

> > +static int unpack_parse_unit (DiracParseUnit *pu, DiracParseContext *pc,
> > +                              int offset)
> > +{
> > +    uint8_t *start = pc->buffer + offset;
> > +    uint8_t *end = pc->buffer + pc->index;
> 
> ditto
> 

Done

> > +        if (*buf_size == 0 && pc->buffer[4] == 0x10) {
> > +            *buf = pc->buffer;
> > +            *buf_size = pc->index;
> 
> ditto
> 

Done

> > +        memcpy (pc->buffer+pc->index, (*buf + pc->sync_offset),
> 
> nit: Leave out the space between the function name and the opening
> parenthesis, same in other places.
> 

Done.

> Diego

I've attached a modified patch to this email.

Regards,
Anuradha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: issue694_libdirac_libschroedinger_svn_16006.diff
Type: text/x-patch
Size: 9738 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081205/97ecbcef/attachment.bin>



More information about the ffmpeg-devel mailing list