summaryrefslogtreecommitdiff
path: root/libavformat/riffenc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-12-30 07:51:04 +0100
committerAnton Khirnov <anton@khirnov.net>2015-12-12 21:19:50 +0100
commit9f1eccb97bf8894cb18b14f642500686505ef186 (patch)
tree2956e8818cf74dd4764bc864fa794e2a4559a6cd /libavformat/riffenc.c
parent1f008f34d5b2b5f6217521747e7acfe3efc0e666 (diff)
ff_parse_specific_params: do not use AVCodecContext.frame_size
It will not be set unless the muxing codec context is also the encoding context, which is discouraged. When the frame size is not known from av_get_audio_frame_duration(), the fallback should still be good enough.
Diffstat (limited to 'libavformat/riffenc.c')
-rw-r--r--libavformat/riffenc.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c
index 81b3b2da12..2e4b7e0b18 100644
--- a/libavformat/riffenc.c
+++ b/libavformat/riffenc.c
@@ -212,12 +212,7 @@ void ff_parse_specific_params(AVStream *st, int *au_rate,
int gcd;
int audio_frame_size;
- /* We use the known constant frame size for the codec if known, otherwise
- * fall back on using AVCodecContext.frame_size, which is not as reliable
- * for indicating packet duration. */
audio_frame_size = av_get_audio_frame_duration(codec, 0);
- if (!audio_frame_size)
- audio_frame_size = codec->frame_size;
*au_ssize = codec->block_align;
if (audio_frame_size && codec->sample_rate) {