X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fsbc_parser.c;h=8bf726b39e3706a1bae1235f2022c1f97d42128a;hb=90262f3fb4afe4b903888e45cc40e2116cb69683;hp=f56564147a43e5c951b86b11c967a484178b6813;hpb=34a0a9746b2f441db7c45983838a88aa87a33834;p=ffmpeg diff --git a/libavcodec/sbc_parser.c b/libavcodec/sbc_parser.c index f56564147a4..8bf726b39e3 100644 --- a/libavcodec/sbc_parser.c +++ b/libavcodec/sbc_parser.c @@ -42,7 +42,6 @@ static int sbc_parse_header(AVCodecParserContext *s, AVCodecContext *avctx, if (data[0] == MSBC_SYNCWORD && data[1] == 0 && data[2] == 0) { avctx->channels = 1; - avctx->sample_fmt = AV_SAMPLE_FMT_S16; avctx->sample_rate = 16000; avctx->frame_size = 120; s->duration = avctx->frame_size; @@ -66,7 +65,6 @@ static int sbc_parse_header(AVCodecParserContext *s, AVCodecContext *avctx, + (joint * subbands)) + 7) / 8; avctx->channels = channels; - avctx->sample_fmt = AV_SAMPLE_FMT_S16; avctx->sample_rate = sample_rates[sr]; avctx->frame_size = subbands * blocks; s->duration = avctx->frame_size; @@ -114,7 +112,7 @@ static int sbc_parse(AVCodecParserContext *s, AVCodecContext *avctx, return next; } -AVCodecParser ff_sbc_parser = { +const AVCodecParser ff_sbc_parser = { .codec_ids = { AV_CODEC_ID_SBC }, .priv_data_size = sizeof(SBCParseContext), .parser_parse = sbc_parse,