On 18/12/14 11:29, Martin Storsjö wrote:
> 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.
> ---
>  libavformat/rtpenc.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
> index dafe3a0..e5dc805 100644
> --- a/libavformat/rtpenc.c
> +++ b/libavformat/rtpenc.c
> @@ -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) {
> 

Ok.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to