Commit fd786bad authored by Lukasz Marek's avatar Lukasz Marek

tools/uncoded_frame: fix audio codec generation

Codec id is guessed from uninitialized sample format.
Signed-off-by: 's avatarLukasz Marek <lukasz.m.luki@gmail.com>
parent 46f72ea5
......@@ -177,12 +177,12 @@ int main(int argc, char **argv)
st->stream->codec->pix_fmt = st->link->format;
break;
case AVMEDIA_TYPE_AUDIO:
st->stream->codec->codec_id =
av_get_pcm_codec(st->stream->codec->sample_fmt, -1);
st->stream->codec->channel_layout = st->link->channel_layout;
st->stream->codec->channels = avfilter_link_get_channels(st->link);
st->stream->codec->sample_rate = st->link->sample_rate;
st->stream->codec->sample_fmt = st->link->format;
st->stream->codec->codec_id =
av_get_pcm_codec(st->stream->codec->sample_fmt, -1);
break;
default:
av_assert0(!"reached");
......
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