summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-04 02:25:46 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-06 18:31:47 +0200
commit850cbd496f8d583467cf6194dec3f6264efc0521 (patch)
tree7f326e16c7c93c5e6fde911ed8afd5101c208ff5
parentd9909b11d9b044e023daefb75de219d643af4d7f (diff)
downloadffmpeg-streaming-850cbd496f8d583467cf6194dec3f6264efc0521.zip
ffmpeg-streaming-850cbd496f8d583467cf6194dec3f6264efc0521.tar.gz
avformat/utils: Slightly un-clutter code in determinable_frame_size() by using a switch
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/utils.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index c97d248..c641377 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -894,12 +894,13 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
static int determinable_frame_size(AVCodecContext *avctx)
{
- if (/*avctx->codec_id == AV_CODEC_ID_AAC ||*/
- avctx->codec_id == AV_CODEC_ID_MP1 ||
- avctx->codec_id == AV_CODEC_ID_MP2 ||
- avctx->codec_id == AV_CODEC_ID_MP3/* ||
- avctx->codec_id == AV_CODEC_ID_CELT*/)
+ switch(avctx->codec_id) {
+ case AV_CODEC_ID_MP1:
+ case AV_CODEC_ID_MP2:
+ case AV_CODEC_ID_MP3:
return 1;
+ }
+
return 0;
}
OpenPOWER on IntegriCloud