diff options
author | corey <corey@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-02-21 09:39:22 +0000 |
---|---|---|
committer | corey <corey@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-02-21 09:39:22 +0000 |
commit | 960b978a037702e3c684b66b6ab2cdd4d62c5162 (patch) | |
tree | ca292bc48860e8d135f9e1ef3bc1c10acf52e633 /libmpcodecs/ve_xvid4.c | |
parent | 14d023a2ee8ccc35d0c0e46a8a9dc3da41328c9d (diff) | |
download | mpv-960b978a037702e3c684b66b6ab2cdd4d62c5162.tar.bz2 mpv-960b978a037702e3c684b66b6ab2cdd4d62c5162.tar.xz |
Fix video delay when encoding with B-frames.
Encoding delay is adjusted for on-the-fly during encoding.
Decoding delay is compensated for by setting an appropriate dwStart on
the audio stream (only in muxer_avi at this point).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17660 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/ve_xvid4.c')
-rw-r--r-- | libmpcodecs/ve_xvid4.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libmpcodecs/ve_xvid4.c b/libmpcodecs/ve_xvid4.c index 3789b8dc67..201aec6acc 100644 --- a/libmpcodecs/ve_xvid4.c +++ b/libmpcodecs/ve_xvid4.c @@ -504,6 +504,8 @@ config(struct vf_instance_s* vf, /* Store the encoder instance into the private data */ mod->instance = mod->create.handle; + mod->mux->decoder_delay = mod->create.max_bframes ? 1 : 0; + return(FINE); } @@ -620,7 +622,10 @@ put_image(struct vf_instance_s* vf, mp_image_t *mpi) } /* If size is == 0, we're done with that frame */ - if(size == 0) return(FINE); + if(size == 0) { + ++mod->mux->encoder_delay; + return(FINE); + } /* xvidcore returns stats about encoded frame in an asynchronous way * accumulate these stats */ |