From 46a86c61940ec8efdfa90b23f05c38ecc1184a34 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sun, 21 Oct 2012 19:18:07 -0400 Subject: [PATCH 1/3] alacdec: set bits_per_raw_sample --- libavcodec/alac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/alac.c b/libavcodec/alac.c index 11f90fc4a5..80f6863105 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -574,6 +574,7 @@ static av_cold int alac_decode_init(AVCodecContext * avctx) alac->sample_size); return AVERROR_PATCHWELCOME; } + avctx->bits_per_raw_sample = alac->sample_size; if (alac->channels < 1) { av_log(avctx, AV_LOG_WARNING, "Invalid channel count\n"); From d6f4fe68c8e87175e826fdca92e0f3c65793123e Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 17 Oct 2012 07:17:24 +0200 Subject: [PATCH 2/3] lavc: extend frame_size doxy. --- libavcodec/avcodec.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index cda6703167..64d45db349 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2081,7 +2081,13 @@ typedef struct AVCodecContext { /* The following data should not be initialized. */ /** - * Samples per packet, initialized when calling 'init'. + * Number of samples per channel in an audio frame. + * + * - encoding: set by libavcodec in avcodec_open2(). Each submitted frame + * except the last must contain exactly frame_size samples per channel. + * May be 0 when the codec has CODEC_CAP_VARIABLE_FRAME_SIZE set, then the + * frame size is not restricted. + * - decoding: may be set by some decoders to indicate constant frame size */ int frame_size; From 6173a8fe5d2c0dd490b102101ae5e283d41dfe87 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 17 Oct 2012 06:39:13 +0200 Subject: [PATCH 3/3] riff: remove a write-only variable --- libavformat/riff.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/riff.c b/libavformat/riff.c index 3676b76f54..f44feff9a5 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -578,10 +578,9 @@ void ff_riff_write_info_tag(AVIOContext *pb, const char *tag, const char *str) static int riff_has_valid_tags(AVFormatContext *s) { int i; - AVDictionaryEntry *t = NULL; for (i = 0; *ff_riff_tags[i]; i++) { - if ((t = av_dict_get(s->metadata, ff_riff_tags[i], NULL, AV_DICT_MATCH_CASE))) + if (av_dict_get(s->metadata, ff_riff_tags[i], NULL, AV_DICT_MATCH_CASE)) return 1; }