1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 10:02:17 +00:00
mpv/audio/decode
wm4 614efea3e6 ad_lavc: work around braindead ffmpeg behavior
The libavcodec wmapro decoder will skip some bytes at the start of the
first packet and return each time. It will not return any audio data in
this state.

Our own code as well as libavcodec's new API handling
(avcodec_send_packet() etc.) discard the PTS on the first return, which
means the PTS is never known for the first packet. This results in a
"Failed audio resync." message.

Fixy it by remember the PTS in next_pts. This field is used only if the
decoder outputs no PTS, and is updated after each frame - and thus
should be safe to set.

(Possibly this should be fixed in libavcodec new API handling by not
setting the PTS to NOPTS as long as no real data has been output. It
could even interpolate the PTS if the timebase is known.)

Fixes the failure message seen in #3297.
2016-07-01 15:51:34 +02:00
..
ad_lavc.c ad_lavc: work around braindead ffmpeg behavior 2016-07-01 15:51:34 +02:00
ad_spdif.c ad_spdif: take care of deprecated libavcodec API usage 2016-04-20 19:37:45 +02:00
ad.h audio: move direct packet reading from decoders to common code 2016-01-19 22:24:38 +01:00
dec_audio.c dec_audio: fix segment boudnary switching 2016-06-27 15:12:21 +02:00
dec_audio.h Rewrite ordered chapters and timeline stuff 2016-02-15 21:04:07 +01:00