History

avcodec/msmpeg4dec: Use av_unreachable() for unreachable code

Andreas Rheinhardt committed 1 year ago

Commit ded08d01 parent ef95a8d1 file · +6 −0Browse files

Unified · Split

libavcodec/msmpeg4dec.c+6−0
@@ -379,6 +379,8 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx) · 378 unmodified lines
379 break;379 break;
380 case MSMP4_WMV2:380 case MSMP4_WMV2:
381 break;381 break;
382 default:
383 av_unreachable("List contains all cases using ff_msmpeg4_decode_init()");
382 }384 }
383 385
384 s->slice_height= s->mb_height; //to avoid 1/0 if the first frame is not a keyframe386 s->slice_height= s->mb_height; //to avoid 1/0 if the first frame is not a keyframe
@@ -472,6 +474,8 @@ int ff_msmpeg4_decode_picture_header(MpegEncContext * s) · 87 unmodified lines
472 ms->dc_table_index = get_bits1(&s->gb);474 ms->dc_table_index = get_bits1(&s->gb);
473 s->inter_intra_pred= 0;475 s->inter_intra_pred= 0;
474 break;476 break;
477 default:
478 av_unreachable("ff_msmpeg4_decode_picture_header() only used by MSMP4V1-3, WMV1");
475 }479 }
476 s->no_rounding = 1;480 s->no_rounding = 1;
477 if(s->avctx->debug&FF_DEBUG_PICT_INFO)481 if(s->avctx->debug&FF_DEBUG_PICT_INFO)
@@ -523,6 +527,8 @@ int ff_msmpeg4_decode_picture_header(MpegEncContext * s) · 45 unmodified lines
523 s->inter_intra_pred = s->width*s->height < 320*240 &&527 s->inter_intra_pred = s->width*s->height < 320*240 &&
524 ms->bit_rate <= II_BITRATE;528 ms->bit_rate <= II_BITRATE;
525 break;529 break;
530 default:
531 av_unreachable("ff_msmpeg4_decode_picture_header() only used by MSMP4V1-3, WMV1");
526 }532 }
527 533
528 if(s->avctx->debug&FF_DEBUG_PICT_INFO)534 if(s->avctx->debug&FF_DEBUG_PICT_INFO)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t