Commit adc214e6 authored by Martin Storsjö's avatar Martin Storsjö

rtpenc: Avoid brittle switch fallthroughs

Instead explicitly jump to the default case in the cases where
it is wanted, and avoid fallthrough between different codecs,
which could easily introduce bugs if people editing the code
aren't careful.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 3bb46524
......@@ -255,8 +255,11 @@ static int rtp_write_header(AVFormatContext *s1)
av_log(s1, AV_LOG_ERROR, "Only mono is supported\n");
goto fail;
}
s->num_frames = 0;
goto defaultcase;
case AV_CODEC_ID_AAC:
s->num_frames = 0;
goto defaultcase;
default:
defaultcase:
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment