Opened 2 years ago

Last modified 7 months ago

#9765 new defect

Regresion due to "avcodec/wmadec: fix WMA gapless playback"

Reported by: Mika Fischer Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: wma regression
Cc: Mika Fischer Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug:

I think the commit 19802d170a304f5853d92e01d0513b9e06897d61, which was applied on 2021-09-12 in and is included in n5.0 and n5.0.1 causes a regression.

This is the (shortened) diff for the test decoding in the patch:

  • tests/ref/fate/flcl1905

    diff --git a/tests/ref/fate/flcl1905 b/tests/ref/fate/flcl1905
    index 5f5245ebcf..d702139db8 100644
    a b  
    2 frame|[...]|pts=0|pts_time=0.000000|[...]
    3 frame|[...]|pts=N/A|pts_time=N/A|[...]

As can be seen, the patch causes the first two frames to be dropped, which might be OK to better conform to the MS decoder.

The problem is that only the first frame had the timestamp info from the packet. Since that got dropped, now the first frame decoded from the packet has no timestamp info.

This causes us issues since we assumed that the first audio frame decoded after seeking always has timestamp info.

See also

Change History (3)

comment:1 by Carl Eugen Hoyos, 21 months ago

Component: undeterminedavcodec
Keywords: wma regression added
Priority: normalimportant
Version: unspecifiedgit-master

comment:2 by Balling, 7 months ago

For reference Presentation time of first packet is 3000, but 3000 is preroll. The spec says to substract to get 0.


Specifies the amount of time to buffer data before starting to play the file, in millisecond units. If this value is nonzero, the Play Duration field and all of the payload Presentation Time fields have been offset by this amount. Therefore, player software must subtract the value in the preroll field from the play duration and presentation times to calculate their actual values.

Also see the

comment:3 by Balling, 7 months ago



flags=K_C (C means corrupt).

Note: See TracTickets for help on using tickets.