From: Hendrik Leppkes <[email protected]>
Review-by: Benjamin Larsson
Signed-off-by: Michael Niedermayer <[email protected]>
---
libavcodec/dca.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index 103f058..649834f 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -1830,20 +1830,11 @@ static int dca_decode_frame(AVCodecContext *avctx, void
*data,
return AVERROR_INVALIDDATA;
}
-
- /* There is nothing that prevents a dts frame to change channel
configuration
- but Libav doesn't support that so only set the channels if it is
previously
- unset. Ideally during the first probe for channels the crc should be
checked
- and only set avctx->channels when the crc is ok. Right now the decoder
could
- set the channels based on a broken first frame.*/
- if (s->is_channels_set == 0) {
- s->is_channels_set = 1;
- avctx->channels = channels;
- }
if (avctx->channels != channels) {
- av_log(avctx, AV_LOG_ERROR, "DCA decoder does not support number of "
- "channels changing in stream. Skipping frame.\n");
- return AVERROR_PATCHWELCOME;
+ av_log(avctx, AV_LOG_INFO,
+ "Number of channels changed in DCA decoder (%d -> %d)\n",
+ avctx->channels, channels);
+ avctx->channels = channels;
}
/* get output buffer */
--
1.7.10
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel