diff options
author | Diego Biurrun <diego@biurrun.de> | 2012-12-23 18:10:05 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2012-12-23 18:56:56 +0100 |
commit | f3298f12997eb4b7ad203766f768f92e3dd72a2a (patch) | |
tree | e349cd427d9cfcf74aae21a85cff911c2aacaee6 /libavformat | |
parent | ed40b6bf07342dc80f616e909f0e6fec4073ade4 (diff) | |
download | ffmpeg-f3298f12997eb4b7ad203766f768f92e3dd72a2a.tar.gz |
Return proper error code after av_log_ask_for_sample()
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/anm.c | 4 | ||||
-rw-r--r-- | libavformat/au.c | 2 | ||||
-rw-r--r-- | libavformat/filmstripdec.c | 2 | ||||
-rw-r--r-- | libavformat/mtv.c | 2 | ||||
-rw-r--r-- | libavformat/rsodec.c | 2 | ||||
-rw-r--r-- | libavformat/smjpegdec.c | 2 | ||||
-rw-r--r-- | libavformat/spdifenc.c | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/libavformat/anm.c b/libavformat/anm.c index c7bc843c8e..7e52e8355b 100644 --- a/libavformat/anm.c +++ b/libavformat/anm.c @@ -86,7 +86,7 @@ static int read_header(AVFormatContext *s) avio_skip(pb, 4); /* magic number */ if (avio_rl16(pb) != MAX_PAGES) { av_log_ask_for_sample(s, "max_pages != " AV_STRINGIFY(MAX_PAGES) "\n"); - return AVERROR_INVALIDDATA; + return AVERROR_PATCHWELCOME; } anm->nb_pages = avio_rl16(pb); @@ -166,7 +166,7 @@ static int read_header(AVFormatContext *s) invalid: av_log_ask_for_sample(s, NULL); - ret = AVERROR_INVALIDDATA; + ret = AVERROR_PATCHWELCOME; fail: return ret; diff --git a/libavformat/au.c b/libavformat/au.c index 331c423fcc..8f9a3facd1 100644 --- a/libavformat/au.c +++ b/libavformat/au.c @@ -82,7 +82,7 @@ static int au_read_header(AVFormatContext *s) if (!av_get_bits_per_sample(codec)) { av_log_ask_for_sample(s, "could not determine bits per sample\n"); - return AVERROR_INVALIDDATA; + return AVERROR_PATCHWELCOME; } if (channels == 0 || channels > 64) { diff --git a/libavformat/filmstripdec.c b/libavformat/filmstripdec.c index 7c327e9324..97cecfa58a 100644 --- a/libavformat/filmstripdec.c +++ b/libavformat/filmstripdec.c @@ -56,7 +56,7 @@ static int read_header(AVFormatContext *s) st->nb_frames = avio_rb32(pb); if (avio_rb16(pb) != 0) { av_log_ask_for_sample(s, "unsupported packing method\n"); - return AVERROR_INVALIDDATA; + return AVERROR_PATCHWELCOME; } avio_skip(pb, 2); diff --git a/libavformat/mtv.c b/libavformat/mtv.c index 572288894d..1566faa086 100644 --- a/libavformat/mtv.c +++ b/libavformat/mtv.c @@ -109,7 +109,7 @@ static int mtv_read_header(AVFormatContext *s) if (audio_subsegments == 0) { av_log_ask_for_sample(s, "MTV files without audio are not supported\n"); - return AVERROR_INVALIDDATA; + return AVERROR_PATCHWELCOME; } mtv->full_segment_size = diff --git a/libavformat/rsodec.c b/libavformat/rsodec.c index 3a441a3a3d..2d57a964da 100644 --- a/libavformat/rsodec.c +++ b/libavformat/rsodec.c @@ -50,7 +50,7 @@ static int rso_read_header(AVFormatContext *s) bps = av_get_bits_per_sample(codec); if (!bps) { av_log_ask_for_sample(s, "could not determine bits per sample\n"); - return AVERROR_INVALIDDATA; + return AVERROR_PATCHWELCOME; } /* now we are ready: build format streams */ diff --git a/libavformat/smjpegdec.c b/libavformat/smjpegdec.c index 4cbfa2a580..39bb1b45f5 100644 --- a/libavformat/smjpegdec.c +++ b/libavformat/smjpegdec.c @@ -78,7 +78,7 @@ static int smjpeg_read_header(AVFormatContext *s) case SMJPEG_SND: if (ast) { av_log_ask_for_sample(s, "multiple audio streams not supported\n"); - return AVERROR_INVALIDDATA; + return AVERROR_PATCHWELCOME; } hlength = avio_rb32(pb); if (hlength < 8) diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c index dcdabae1de..cf421a7358 100644 --- a/libavformat/spdifenc.c +++ b/libavformat/spdifenc.c @@ -414,7 +414,7 @@ static int spdif_header_truehd(AVFormatContext *s, AVPacket *pkt) * distribute the TrueHD frames in the MAT frame */ av_log(s, AV_LOG_ERROR, "TrueHD frame too big, %d bytes\n", pkt->size); av_log_ask_for_sample(s, NULL); - return AVERROR_INVALIDDATA; + return AVERROR_PATCHWELCOME; } memcpy(&ctx->hd_buf[ctx->hd_buf_count * TRUEHD_FRAME_OFFSET - BURST_HEADER_SIZE + mat_code_length], |