- made --extra-cflags option work on darwin

- allow INTER4V macroblocks for FLV1 codec
- fixed issue in flv file format saving 8 mp3 frames per packet instead of 1
- fixed crasher in flv file format involving mp3 buffer handling
- added FLV1 codec support for swf file format (FlashPlayer6 or above
required) and made it default
- fixed broken mp3 support in swf file format
patch by (Tinic Uro <turo at macromedia dot com>)
cleanup by me

Originally committed as revision 2756 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Tinic Uro
2004-02-06 23:56:37 +00:00
committed by Michael Niedermayer
parent 8cb5d4c060
commit 747a0554ea
4 changed files with 544 additions and 139 deletions

View File

@ -121,7 +121,7 @@ static int mp3info(void *data, int *byteSize, int *samplesPerFrame, int *sampleR
}
}
*byteSize = ( ( ( ( *samplesPerFrame * (bitRate / bitsPerSlot) ) / *sampleRate ) + isPadded ) * bitsPerSlot);
*byteSize = ( ( ( ( *samplesPerFrame * (bitRate / bitsPerSlot) ) / *sampleRate ) + isPadded ) );
return 1;
}
@ -295,8 +295,15 @@ static int flv_write_packet(AVFormatContext *s, int stream_index,
int mp3SampleRate = 0;
int mp3IsMono = 0;
int mp3SamplesPerFrame = 0;
int c=0;
if ( mp3info(&flv->audioFifo[flv->audioInPos],&mp3FrameSize,&mp3SamplesPerFrame,&mp3SampleRate,&mp3IsMono) ) {
/* copy out mp3 header from ring buffer */
uint8_t header[4];
for (c=0; c<4; c++) {
header[c] = flv->audio_fifo[(flv->audioInPos+c) % AUDIO_FIFO_SIZE];
}
if ( mp3info(header,&mp3FrameSize,&mp3SamplesPerFrame,&mp3SampleRate,&mp3IsMono) ) {
if ( flv->audioSize >= mp3FrameSize ) {
int soundFormat = 0x22;