[FFmpeg-trac] #3541(ffprobe:new): amr file use the last packet mode and size to calculate bit rate,
FFmpeg
trac at avcodec.org
Thu Apr 10 04:29:28 CEST 2014
#3541: amr file use the last packet mode and size to calculate bit rate,
---------------------------------+-----------------------------------
Reporter: queniao | Owner:
Type: defect | Status: new
Priority: normal | Component: ffprobe
Version: 2.1.4 | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
---------------------------------+-----------------------------------
Comment (by queniao):
fix it by set bit rate only once
FFmpeg/libavformat/amr.c View
@@ -138,7 +138,8 @@ static int amr_read_packet(AVFormatContext *s,
AVPacket *pkt)
return AVERROR(EIO);
/* Both AMR formats have 50 frames per second */
- s->streams[0]->codec->bit_rate = size*8*50;
+ if ( s->streams[0]->codec->bit_rate == 0 )
+ s->streams[0]->codec->bit_rate = size*8*50;
pkt->stream_index = 0;
pkt->pos = pos;
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3541#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list