diff --git a/libavcodec/anm.c b/libavcodec/anm.c
index fc328bb06b11f769601c2132a512a1e3134c6188..d08ed8d1400536b01dab4bf1f732fe6f63be84ba 100644
--- a/libavcodec/anm.c
+++ b/libavcodec/anm.c
@@ -158,7 +158,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 c6f4ffa25cb6ddd873999d825974975171b23340..9bf68634a9696350d3ba6cbb02b279e8a2246417 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 1a0b3416417a6316825ca88f38b49753335e0f7a..fae8440a1e2cb624487683e815459d8251d862e6 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2873,7 +2873,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 e769537706b53ba3714cdf47db100eeed3d1f701..16f930730b7ebf74298c963a63f01cdc7325cb51 100644
--- a/libavcodec/pictordec.c
+++ b/libavcodec/pictordec.c
@@ -123,7 +123,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(s, "unsupported bit depth\n");
-        return AVERROR_INVALIDDATA;
+        return AVERROR_PATCHWELCOME;
     }
 
     if (bytestream2_peek_byte(&s->g) == 0xFF) {
diff --git a/libavcodec/ptx.c b/libavcodec/ptx.c
index 77fd19615a462ab1553e4fba867c769e6df294b6..d4cd963e46f347fdbefa3326b2052f8c2ad366e9 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_RGB555;
diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c
index f6ca35c7b7a836a8b972d65a1a8b761b56542f25..c49f9fecbff76a592b5886ef7cf65f856a0ab18c 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 66e3427b78608101bc52ad06d8954d610f6ed540..486e41f895d8cd6587c67cc40c828c4e1d404229 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 a36c2c21c3ef81a9f662af47888f44ba8528c375..747ac37dc00e6f19cb57d9d05b73873be4aff493 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 e19c3d36b965410847cf0e65e442063d15f50267..d58278b76def13346531e81a8e6a060fe42f0f81 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 */
@@ -680,7 +680,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 &&
@@ -1150,7 +1150,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;
     }
 
 
diff --git a/libavformat/anm.c b/libavformat/anm.c
index c7bc843c8eb39dc0a69a71ce2bb3f15bf86b31cc..7e52e8355b121ec3fba527de2c5dc06571967e58 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 331c423fcc979b78a4556dd519da2304df1c094c..8f9a3facd1f2bd915442489c3feaf071e976d851 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 7c327e93247a56c43dbbb150656a1336a2717654..97cecfa58a51cb0168a0901812d9c64960daf5b2 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 572288894dda0d44f8330aed2e51a198386e6542..1566faa0863bb1eb36506285dab87146ca343198 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 3a441a3a3dd149becc7bf3717cffc1719e066464..2d57a964da49961b7b86ef29687a906b02ce1c50 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 4cbfa2a5801ea611be31945334bcb4171840d092..39bb1b45f5702ebcffee8b4e4e12c957f8404209 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 dcdabae1de3649488e8ab52da22ba2c1e83f9524..cf421a7358180e05d6e2d436073bce2a9d93f399 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],