avformat/utils: Slightly un-clutter code in determinable_frame_size() by using a switch

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2017-06-04 02:25:46 +02:00
parent d9909b11d9
commit 850cbd496f
1 changed files with 6 additions and 5 deletions

View File

@ -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;
}