summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-24 15:09:58 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-24 15:09:58 +0100
commitd69238e991844cb0e9407c26e64dd7a551aa5bab (patch)
treea6169232d84d75370f66dcf011f8d7ee45594f8a /libavcodec
parentc6664242e0700ea0bc10109c7e84c3f9cf7fb9ae (diff)
parentf3298f12997eb4b7ad203766f768f92e3dd72a2a (diff)
Merge commit 'f3298f12997eb4b7ad203766f768f92e3dd72a2a'
* commit 'f3298f12997eb4b7ad203766f768f92e3dd72a2a': Return proper error code after av_log_ask_for_sample() configure: cosmetics: Separate hwaccel dependencies from decoders/encoders oggdec: check memory allocation Conflicts: configure libavcodec/pictordec.c libavformat/anm.c libavformat/oggdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/anm.c2
-rw-r--r--libavcodec/cinepak.c2
-rw-r--r--libavcodec/h264.c2
-rw-r--r--libavcodec/pictordec.c2
-rw-r--r--libavcodec/ptx.c2
-rw-r--r--libavcodec/truemotion1.c2
-rw-r--r--libavcodec/truespeech.c2
-rw-r--r--libavcodec/wmalosslessdec.c2
-rw-r--r--libavcodec/wmaprodec.c6
9 files changed, 11 insertions, 11 deletions
diff --git a/libavcodec/anm.c b/libavcodec/anm.c
index c27ab1de1c..d405213c82 100644
--- a/libavcodec/anm.c
+++ b/libavcodec/anm.c
@@ -159,7 +159,7 @@ static int decode_frame(AVCodecContext *avctx,
break; // stop
if (type == 2) {
av_log_ask_for_sample(avctx, "unknown opcode");
- return AVERROR_INVALIDDATA;
+ return AVERROR_PATCHWELCOME;
}
continue;
}
diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
index 9c6d290173..b323da4741 100644
--- a/libavcodec/cinepak.c
+++ b/libavcodec/cinepak.c
@@ -334,7 +334,7 @@ static int cinepak_decode (CinepakContext *s)
if (s->sega_film_skip_bytes == -1) {
if (!encoded_buf_size) {
av_log_ask_for_sample(s->avctx, "encoded_buf_size is 0");
- return AVERROR_INVALIDDATA;
+ return AVERROR_PATCHWELCOME;
}
if (encoded_buf_size != s->size && (s->size % encoded_buf_size) != 0) {
/* If the encoded frame size differs from the frame size as indicated
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 63df2c71c4..81d6d012a2 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2942,7 +2942,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
av_log_ask_for_sample(s->avctx, NULL);
s->picture_structure = last_pic_structure;
s->droppable = last_pic_droppable;
- return AVERROR_INVALIDDATA;
+ return AVERROR_PATCHWELCOME;
}
/* Take ownership of this buffer. Note that if another thread owned
diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c
index b7d7bf0cd4..7c8f7e9f36 100644
--- a/libavcodec/pictordec.c
+++ b/libavcodec/pictordec.c
@@ -131,7 +131,7 @@ static int decode_frame(AVCodecContext *avctx,
bpp = bits_per_plane * s->nb_planes;
if (bits_per_plane > 8 || bpp < 1 || bpp > 32) {
av_log_ask_for_sample(avctx, "unsupported bit depth\n");
- return AVERROR_INVALIDDATA;
+ return AVERROR_PATCHWELCOME;
}
if (bytestream2_peek_byte(&s->g) == 0xFF || bpp == 1 || bpp == 4 || bpp == 8) {
diff --git a/libavcodec/ptx.c b/libavcodec/ptx.c
index 91231a8baa..720dad1b94 100644
--- a/libavcodec/ptx.c
+++ b/libavcodec/ptx.c
@@ -57,7 +57,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
if (bytes_per_pixel != 2) {
av_log_ask_for_sample(avctx, "Image format is not RGB15.\n");
- return -1;
+ return AVERROR_PATCHWELCOME;
}
avctx->pix_fmt = AV_PIX_FMT_BGR555LE;
diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c
index 6378d6388d..e2c1d2804a 100644
--- a/libavcodec/truemotion1.c
+++ b/libavcodec/truemotion1.c
@@ -356,7 +356,7 @@ static int truemotion1_decode_header(TrueMotion1Context *s)
if (s->flags & FLAG_SPRITE) {
av_log_ask_for_sample(s->avctx, "SPRITE frame found.\n");
/* FIXME header.width, height, xoffset and yoffset aren't initialized */
- return -1;
+ return AVERROR_PATCHWELCOME;
} else {
s->w = header.xsize;
s->h = header.ysize;
diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c
index e8a88cfb74..edaaea686a 100644
--- a/libavcodec/truespeech.c
+++ b/libavcodec/truespeech.c
@@ -65,7 +65,7 @@ static av_cold int truespeech_decode_init(AVCodecContext * avctx)
if (avctx->channels != 1) {
av_log_ask_for_sample(avctx, "Unsupported channel count: %d\n", avctx->channels);
- return AVERROR(EINVAL);
+ return AVERROR_PATCHWELCOME;
}
avctx->channel_layout = AV_CH_LAYOUT_MONO;
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 066b572fc2..4f372619ee 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -203,7 +203,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
} else {
av_log_ask_for_sample(avctx, "Unsupported extradata size\n");
- return AVERROR_INVALIDDATA;
+ return AVERROR_PATCHWELCOME;
}
/* generic init */
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index 3c1ca48f9f..41e07aa5f8 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -299,7 +299,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
} else {
av_log_ask_for_sample(avctx, "Unknown extradata size\n");
- return AVERROR_INVALIDDATA;
+ return AVERROR_PATCHWELCOME;
}
/** generic init */
@@ -690,7 +690,7 @@ static int decode_channel_transform(WMAProDecodeCtx* s)
if (get_bits1(&s->gb)) {
av_log_ask_for_sample(s->avctx,
"unsupported channel transform bit\n");
- return AVERROR_INVALIDDATA;
+ return AVERROR_PATCHWELCOME;
}
for (s->num_chgroups = 0; remaining_channels &&
@@ -1160,7 +1160,7 @@ static int decode_subframe(WMAProDecodeCtx *s)
/** no idea for what the following bit is used */
if (get_bits1(&s->gb)) {
av_log_ask_for_sample(s->avctx, "reserved bit set\n");
- return AVERROR_INVALIDDATA;
+ return AVERROR_PATCHWELCOME;
}