aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-14 02:42:14 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-14 03:00:39 +0200
commited488d1535d9e7b729dda2a6ffe8ecff481dad83 (patch)
tree57fc1f59c2a17fb691ee8093875018e3af1d46e3 /libavcodec
parent986ec3417abd2f77a4ee88ab9cb86d91556729d8 (diff)
downloadffmpeg-ed488d1535d9e7b729dda2a6ffe8ecff481dad83.tar.gz
Move frame_size fallback from ff_get_audio_frame_size() to av_get_audio_frame_duration()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index de371e8a81..4531311f63 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -3306,6 +3306,10 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
}
}
+ /* Fall back on using frame_size */
+ if (avctx->frame_size > 1 && frame_bytes)
+ return avctx->frame_size;
+
return 0;
}