diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-03-13 17:15:51 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-03-13 17:15:51 +0000 |
commit | 4f3dfe97389fc646b04c41d004aa3f3fb15adc0f (patch) | |
tree | 13c96be9f9de13416cfd7b091471fbace6bf586c /libmpcodecs/ae_lavc.c | |
parent | a059a420e9293e2669e0b091a5dc916c06faceea (diff) | |
download | mpv-4f3dfe97389fc646b04c41d004aa3f3fb15adc0f.tar.bz2 mpv-4f3dfe97389fc646b04c41d004aa3f3fb15adc0f.tar.xz |
do not randomly chop up packets, this isnt allowed in almost no container
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17856 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/ae_lavc.c')
-rw-r--r-- | libmpcodecs/ae_lavc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libmpcodecs/ae_lavc.c b/libmpcodecs/ae_lavc.c index 8893ec5f9b..69b3530b3d 100644 --- a/libmpcodecs/ae_lavc.c +++ b/libmpcodecs/ae_lavc.c @@ -102,8 +102,7 @@ static int encode_lavc(audio_encoder_t *encoder, uint8_t *dest, void *src, int s { int n; n = avcodec_encode_audio(lavc_actx, dest, size, src); - if(n > compressed_frame_size) - compressed_frame_size = n; //it's valid because lavc encodes in cbr mode + compressed_frame_size = n; return n; } @@ -116,7 +115,9 @@ static int close_lavc(audio_encoder_t *encoder) static int get_frame_size(audio_encoder_t *encoder) { - return compressed_frame_size; + int sz = compressed_frame_size; + compressed_frame_size = 0; + return sz; } static uint32_t lavc_find_atag(char *codec) |