aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aac_ac3_parser.h
diff options
context:
space:
mode:
authorJun Zhao <barryjzhao@tencent.com>2020-05-17 12:10:05 +0800
committerJun Zhao <barryjzhao@tencent.com>2020-06-26 09:53:36 +0800
commit60d79b1df9d4c6030010ccb0c134ede9e33158c2 (patch)
treeeca70df320e7b35240d68f1eed3a8f148a730203 /libavcodec/aac_ac3_parser.h
parenta8fb7612a97530bdd0b2549dacf91dcf71a3187a (diff)
downloadffmpeg-60d79b1df9d4c6030010ccb0c134ede9e33158c2.tar.gz
lavc/aac_ac3_parser: improve the raw AAC file bit rate calculation
Now we just use one ADTS raw frame to calculate the bit rate, it's lead to a larger error when get the duration from bit rate, the improvement cumulate Nth ADTS frames to get the average bit rate. e,g used the command get the duration like: ffprobe -show_entries format=duration -i fate-suite/aac/foo.aac before this improvement dump the duration=2.173935 after this improvement dump the duration=1.979267 in fact, the real duration can be get by command like: ffmpeg -i fate-suite/aac/foo.aac -f null /dev/null with time=00:00:01.97 Also update the fate-adtstoasc_ticket3715. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Diffstat (limited to 'libavcodec/aac_ac3_parser.h')
-rw-r--r--libavcodec/aac_ac3_parser.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/aac_ac3_parser.h b/libavcodec/aac_ac3_parser.h
index c2506a5bfd..b04041f69d 100644
--- a/libavcodec/aac_ac3_parser.h
+++ b/libavcodec/aac_ac3_parser.h
@@ -55,6 +55,8 @@ typedef struct AACAC3ParseContext {
uint64_t state;
int need_next_header;
+ int frame_number;
+ int last_bit_rate;
enum AVCodecID codec_id;
} AACAC3ParseContext;