diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-02-22 01:35:41 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-02-22 02:24:18 +0100 |
commit | 184fc600e101bb6190ec92a8a3be8898ff22d225 (patch) | |
tree | 95dd194f10cf704c3f097fed5eedaf4538a542a5 /libavcodec/mlpdec.c | |
parent | 92b5f71a7d30974250918b12e93c974b9b555d11 (diff) | |
parent | 5d42ac7ffb5471666136402a553454caf3a3c989 (diff) | |
download | ffmpeg-184fc600e101bb6190ec92a8a3be8898ff22d225.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
mpegvideo_enc: only allocate output packet when we know there will be output
Add names for more channel layouts to the channel layout map.
sunrast: Add a sample request for RMP_RAW colormap.
avcodec: do not override pts or duration from the audio encoder
Add prores regression test.
Enable already existing rso regression test.
Add regression test for "sox" format muxer/demuxer.
Add dpx encoding regression test.
swscale: K&R formatting cosmetics for PowerPC code (part I/II)
img2: Use ff_guess_image2_codec(filename) shorthand where appropriate.
Clarify licensing information about files borrowed from libjpeg.
Mark mutable static data const where appropriate.
avplay: fix -threads option
dvbsubdec: avoid undefined signed left shift in RGBA macro
mlpdec: use av_log_ask_for_sample()
gif: K&R formatting cosmetics
png: make .long_name more descriptive
movdec: Adjust keyframe flagging in fragmented files
rv34: change most "int stride" into "ptrdiff_t stride".
Conflicts:
avprobe.c
ffplay.c
libavcodec/mlpdec.c
libavcodec/mpegvideo_enc.c
libavcodec/pngenc.c
libavcodec/x86/v210-init.c
libavfilter/vf_boxblur.c
libavfilter/vf_crop.c
libavfilter/vf_drawtext.c
libavfilter/vf_lut.c
libavfilter/vf_overlay.c
libavfilter/vf_pad.c
libavfilter/vf_scale.c
libavfilter/vf_select.c
libavfilter/vf_setpts.c
libavfilter/vf_settb.c
libavformat/img2.c
libavutil/audioconvert.c
tests/codec-regression.sh
tests/lavf-regression.sh
tests/ref/lavf/dpx
tests/ref/vsynth1/prores
tests/ref/vsynth2/prores
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mlpdec.c')
-rw-r--r-- | libavcodec/mlpdec.c | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index 9909a71e38..07d5a65826 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -38,12 +38,6 @@ /** number of bits used for VLC lookup - longest Huffman code is 9 */ #define VLC_BITS 9 - -static const char* sample_message = - "Please file a bug report following the instructions at " - "http://ffmpeg.org/bugreports.html and include " - "a sample of this file."; - typedef struct SubStream { /// Set if a valid restart header has been read. Otherwise the substream cannot be decoded. uint8_t restart_seen; @@ -308,10 +302,10 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb) return AVERROR_INVALIDDATA; } if (mh.num_substreams > MAX_SUBSTREAMS) { - av_log(m->avctx, AV_LOG_ERROR, + av_log_ask_for_sample(m->avctx, "Number of substreams %d is larger than the maximum supported " - "by the decoder. %s\n", mh.num_substreams, sample_message); - return AVERROR_INVALIDDATA; + "by the decoder.\n", mh.num_substreams); + return AVERROR_PATCHWELCOME; } m->access_unit_size = mh.access_unit_size; @@ -410,10 +404,10 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, /* This should happen for TrueHD streams with >6 channels and MLP's noise * type. It is not yet known if this is allowed. */ if (s->max_channel > MAX_MATRIX_CHANNEL_MLP && !s->noise_type) { - av_log(m->avctx, AV_LOG_ERROR, + av_log_ask_for_sample(m->avctx, "Number of channels %d is larger than the maximum supported " - "by the decoder. %s\n", s->max_channel+2, sample_message); - return AVERROR_INVALIDDATA; + "by the decoder.\n", s->max_channel + 2); + return AVERROR_PATCHWELCOME; } if (s->min_channel > s->max_channel) { @@ -455,10 +449,10 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, for (ch = 0; ch <= s->max_matrix_channel; ch++) { int ch_assign = get_bits(gbp, 6); if (ch_assign > s->max_matrix_channel) { - av_log(m->avctx, AV_LOG_ERROR, - "Assignment of matrix channel %d to invalid output channel %d. %s\n", - ch, ch_assign, sample_message); - return AVERROR_INVALIDDATA; + av_log_ask_for_sample(m->avctx, + "Assignment of matrix channel %d to invalid output channel %d.\n", + ch, ch_assign); + return AVERROR_PATCHWELCOME; } s->ch_assign[ch_assign] = ch; } @@ -813,8 +807,8 @@ static int read_block_data(MLPDecodeContext *m, GetBitContext *gbp, if (s->data_check_present) { expected_stream_pos = get_bits_count(gbp); expected_stream_pos += get_bits(gbp, 16); - av_log(m->avctx, AV_LOG_WARNING, "This file contains some features " - "we have not tested yet. %s\n", sample_message); + av_log_ask_for_sample(m->avctx, "This file contains some features " + "we have not tested yet.\n"); } if (s->blockpos + s->blocksize > m->access_unit_size) { |