aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki@gmail.com>2014-03-24 17:49:04 +0100
committerLukasz Marek <lukasz.m.luki@gmail.com>2014-03-29 09:25:14 +0100
commitfd786bad6321dd800265b1e5ae8c7e1d2e272a94 (patch)
treef8084ae21b5a28894f37624c02e96e700c0034ec /tools
parent46f72ea507afee6adb0d2324848159063d0e7afc (diff)
downloadffmpeg-fd786bad6321dd800265b1e5ae8c7e1d2e272a94.tar.gz
tools/uncoded_frame: fix audio codec generation
Codec id is guessed from uninitialized sample format. Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/uncoded_frame.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/uncoded_frame.c b/tools/uncoded_frame.c
index eafbbfde17..53e71eacbf 100644
--- a/tools/uncoded_frame.c
+++ b/tools/uncoded_frame.c
@@ -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");