[FFmpeg-devel] [PATCH]: Modify decode_frame() in mpegaudiodec.c to only consume s->frame_size bytes max

Chris Pinkham cpinkham
Sun May 27 18:57:53 CEST 2007

* On Sun May 27, 2007 at 11:17:40AM +0200, Michael Niedermayer wrote:
> the issue is that libav* expects a single mp3 frame in a AVPacket
> and not multiple ones, later would break stream copy into other
> container formats which per specification need 1 mp3 frame within
> their packets. i dunno if .nuv really was supposed to contain multiple
> mp3 frames per packet or if that was rather some encoder bug ...
> also mp3 frames can differ in their size (even for CBR mp3 when the
> ideal frame size is not an exact integer)

Now that I take another look at the nuv recorder in Myth, I think I
may see the issue.  It could be because we call
lame_encode_flush_nogap() and we write out data from that in the same
nuv frame as the data we got from lame_encode_buffer_interleaved().
I'm looking into this now and will fix it on the MythTV end if that is
the case.  I still think that decode_frame() should only consume a
single frame though and not report back that it used all the data when
it in fact didn't, so I need to fix both issues on my end in order to be
able to playback old .nuv files.


More information about the ffmpeg-devel mailing list