diff options
author | wm4 <wm4@nowhere> | 2013-11-23 21:36:20 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-23 21:36:20 +0100 |
commit | 3486302514db31b8086f46226d9b46d53810d1e7 (patch) | |
tree | a5b35e0a67d4cee1b5ec8bb0d489f38495d66b3c /mpvcore/player/audio.c | |
parent | 057af4697cf65709012f41ff2f0d97b918c51d79 (diff) | |
download | mpv-3486302514db31b8086f46226d9b46d53810d1e7.tar.bz2 mpv-3486302514db31b8086f46226d9b46d53810d1e7.tar.xz |
video: move decoder context from sh_video into new struct
This is similar to the sh_audio commit.
This is mostly cosmetic in nature, except that it also adds automatical
freeing of the decoder driver's state struct (which was in
sh_video->context, now in dec_video->priv).
Also remove all the stheader.h fields that are not needed anymore.
Diffstat (limited to 'mpvcore/player/audio.c')
-rw-r--r-- | mpvcore/player/audio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mpvcore/player/audio.c b/mpvcore/player/audio.c index ce161a58d5..377b393dfd 100644 --- a/mpvcore/player/audio.c +++ b/mpvcore/player/audio.c @@ -36,6 +36,7 @@ #include "audio/filter/af.h" #include "audio/out/ao.h" #include "demux/demux.h" +#include "video/decode/dec_video.h" #include "mp_core.h" @@ -302,7 +303,7 @@ static int audio_start_sync(struct MPContext *mpctx, int playsize) if (hrseek) ptsdiff = written_pts - mpctx->hrseek_pts; else - ptsdiff = written_pts - mpctx->sh_video->pts - mpctx->delay + ptsdiff = written_pts - mpctx->d_video->pts - mpctx->delay - mpctx->audio_delay; samples = ptsdiff * real_samplerate; @@ -376,7 +377,7 @@ int fill_audio_out_buffers(struct MPContext *mpctx, double endpts) playsize = ao_get_space(ao); // Coming here with hrseek_active still set means audio-only - if (!mpctx->sh_video || !mpctx->sync_audio_to_video) + if (!mpctx->d_video || !mpctx->sync_audio_to_video) mpctx->syncing_audio = false; if (!opts->initial_audio_sync || !modifiable_audio_format) { mpctx->syncing_audio = false; |