aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-04-28 14:07:50 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-04-28 20:14:48 +0200
commit128dda7016719fc763c0c9f754abb3196b9e18f3 (patch)
tree9154e3d96ebe1fa5262cf1e71465891f4d2ca66d /libavcodec/utils.c
parent4b0521eca9647a092388c44186ea07b3d4416cdb (diff)
downloadffmpeg-128dda7016719fc763c0c9f754abb3196b9e18f3.tar.gz
lavc: add a sample_rate field to AVFrame.
The field is filled with the codec context information.
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 85c6351380..4b6ddeae1c 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1547,6 +1547,8 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
frame->format = avctx->sample_fmt;
if (!frame->channel_layout)
frame->channel_layout = avctx->channel_layout;
+ if (!frame->sample_rate)
+ frame->sample_rate = avctx->sample_rate;
}
avctx->pkt = NULL;