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

Anuradha Suraparaju anuradha
Thu Nov 6 03:49:55 CET 2008


Hi,

On Sat, 2008-10-18 at 21:50 +0200, Diego Biurrun wrote:
> Hi Anuradha, I wanted to point out the following bug report we received
> to you:
> 
> https://roundup.mplayerhq.hu/roundup/ffmpeg/issue694
> 
> A/V sync is lost with Dirac.  It's likely an issue in your code.
> 

I've attached a patch for the Dirac A/V sync loss. The patch modifies 3
files.

1. Codec files
libavcodec/libschroedingerdec.c
libavcodec/libdiracdec.c
    Set the has_b_frames flags for non-intra frames.

2. Dirac parser

libavcodec/dirac_parse.c
This has been rewritten to a large extent to do the following.

a. Parse correctly. We cannot rely on BBCD to be able to sync to detect
parse units. Since Dirac uses Arithmetic coding, the entropy data coded
using Arithmetic coding can contain the string 'BBCD' thereby causing
false detection of a parse unit. So we need to check the parse offsets
to determine if we do indeed have a parse unit. This fix is necessary
for the A/V sync loss problem.

b. Timing info - When parsing a raw dirac bytestream set the pts and dts
info correctly so that -vcodec copy option and decoding work correctly
i.e. do not produce extra frames.

Regards,
Anuradha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: issue694_libdirac_libschroedinger_svn_15783.diff
Type: text/x-patch
Size: 12693 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081106/48145fa6/attachment.bin>



More information about the ffmpeg-devel mailing list