[FFmpeg-devel] Corrupt duration in packet while encoding to WMA

Michael Niedermayer michaelni
Mon Dec 3 11:22:56 CET 2007

On Mon, Dec 03, 2007 at 01:56:56AM -0500, Ronen Mizrahi wrote:
> Hello,
> While using ffmpeg to encode to WMA we noticed that when the call below
> is made in asf-enc.c, packet_timestamp_end is smaller than
> packet_timestamp_start and hence a negative duration is written to the
> packet. While Windows Media Player did not seem to care about it,
> Windows Media Player CE (the one used in Pocket PC and Windows Mobile)
> exhibited an odd behavior (such as skipping several seconds slightly
> after starting playback). Changing the order between the start and the
> end below, seems to fix the problem, however I am not certain it is the
> correct thing to do, and would very much appreciate some feedback from
> the maintainer of asf-enc.c
> This is the call where we believe there is a bug:
> put_payload_parsing_info(
>                             s,
>                             asf->packet_timestamp_start,
>                             asf->packet_timestamp_end -
> asf->packet_timestamp_start,
>                             asf->packet_nb_payloads,
>                             asf->packet_size_left
>                         );

thanks for the info
i think ive fixed it in svn, please check!

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071203/d21fc93c/attachment.pgp>

More information about the ffmpeg-devel mailing list