[FFmpeg-cvslog] Merge commit '67deba8a416d818f3d95aef0aa916589090396e2'

Clément Bœsch git at videolan.org
Fri Mar 31 11:41:50 EEST 2017


ffmpeg | branch: master | Clément Bœsch <cboesch at gopro.com> | Fri Mar 31 10:40:34 2017 +0200| [e3287077ecff33bd02227b85ec760fe47d796f54] | committer: Clément Bœsch

Merge commit '67deba8a416d818f3d95aef0aa916589090396e2'

* commit '67deba8a416d818f3d95aef0aa916589090396e2':
  Use avpriv_report_missing_feature() where appropriate

Merged-by: Clément Bœsch <cboesch at gopro.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e3287077ecff33bd02227b85ec760fe47d796f54
---

 libavcodec/alac.c           |  8 ++++----
 libavcodec/bmp.c            |  3 ++-
 libavcodec/fraps.c          |  4 +---
 libavcodec/g2meet.c         | 11 +++++------
 libavcodec/g723_1enc.c      |  3 ++-
 libavcodec/h264_ps.c        |  4 ++--
 libavcodec/hevc_ps_enc.c    | 10 ++++++----
 libavcodec/libopenjpegdec.c |  2 +-
 libavcodec/mjpegdec.c       |  9 +++++----
 libavcodec/opus_silk.c      |  2 +-
 libavcodec/shorten.c        |  4 ++--
 libavcodec/takdec.c         |  2 +-
 libavcodec/txd.c            |  7 +++----
 libavcodec/vp5.c            |  2 +-
 libavdevice/vfwcap.c        |  3 +--
 libavdevice/xcbgrab.c       |  2 +-
 libavformat/avienc.c        |  3 +--
 libavformat/lxfdec.c        |  5 ++---
 libavformat/matroskadec.c   |  7 +++----
 libavformat/mpc8.c          |  2 +-
 libavformat/rsoenc.c        |  2 +-
 libavformat/rtpdec_jpeg.c   |  2 +-
 libavformat/rtpdec_latm.c   |  6 +++---
 libavformat/rtpdec_xiph.c   | 14 ++++++--------
 libavformat/rtsp.c          |  3 +--
 libavformat/spdifenc.c      |  3 ++-
 libavformat/wvdec.c         |  3 ++-
 27 files changed, 61 insertions(+), 65 deletions(-)

diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index ae1204b..d6bd21b 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -251,7 +251,7 @@ static int decode_element(AVCodecContext *avctx, AVFrame *frame, int ch_index,
     alac->extra_bits = get_bits(&alac->gb, 2) << 3;
     bps = alac->sample_size - alac->extra_bits + channels - 1;
     if (bps > 32U) {
-        av_log(avctx, AV_LOG_ERROR, "bps is unsupported: %d\n", bps);
+        avpriv_report_missing_feature(avctx, "bps %d", bps);
         return AVERROR_PATCHWELCOME;
     }
 
@@ -431,7 +431,7 @@ static int alac_decode_frame(AVCodecContext *avctx, void *data,
             break;
         }
         if (element > TYPE_CPE && element != TYPE_LFE) {
-            av_log(avctx, AV_LOG_ERROR, "syntax element unsupported: %d\n", element);
+            avpriv_report_missing_feature(avctx, "Syntax element %d", element);
             return AVERROR_PATCHWELCOME;
         }
 
@@ -583,8 +583,8 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
             avctx->channels = alac->channels;
     }
     if (avctx->channels > ALAC_MAX_CHANNELS || avctx->channels <= 0 ) {
-        av_log(avctx, AV_LOG_ERROR, "Unsupported channel count: %d\n",
-               avctx->channels);
+        avpriv_report_missing_feature(avctx, "Channel count %d",
+                                      avctx->channels);
         return AVERROR_PATCHWELCOME;
     }
     avctx->channel_layout = ff_alac_channel_layouts[alac->channels - 1];
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c
index 1308ec0..7295749 100644
--- a/libavcodec/bmp.c
+++ b/libavcodec/bmp.c
@@ -100,7 +100,8 @@ static int bmp_decode_frame(AVCodecContext *avctx,
         height = bytestream_get_le16(&buf);
         break;
     default:
-        av_log(avctx, AV_LOG_ERROR, "unsupported BMP file, patch welcome\n");
+        avpriv_report_missing_feature(avctx, "Information header size %u",
+                                      ihsize);
         return AVERROR_PATCHWELCOME;
     }
 
diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
index d5fb919..7a7673f 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -160,9 +160,7 @@ static int decode_frame(AVCodecContext *avctx,
     header_size = (header & (1<<30))? 8 : 4; /* bit 30 means pad to 8 bytes */
 
     if (version > 5) {
-        av_log(avctx, AV_LOG_ERROR,
-               "This file is encoded with Fraps version %u. "
-               "This codec can only decode versions <= 5.\n", version);
+        avpriv_report_missing_feature(avctx, "Fraps version %u", version);
         return AVERROR_PATCHWELCOME;
     }
 
diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c
index b0af3ec..10b6808 100644
--- a/libavcodec/g2meet.c
+++ b/libavcodec/g2meet.c
@@ -1442,9 +1442,8 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
             }
             c->compression = bytestream2_get_be32(&bc);
             if (c->compression != 2 && c->compression != 3) {
-                av_log(avctx, AV_LOG_ERROR,
-                       "Unknown compression method %d\n",
-                       c->compression);
+                avpriv_report_missing_feature(avctx, "Compression method %d",
+                                              c->compression);
                 ret = AVERROR_PATCHWELCOME;
                 goto header_fail;
             }
@@ -1475,9 +1474,9 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
                 g_mask = bytestream2_get_be32(&bc);
                 b_mask = bytestream2_get_be32(&bc);
                 if (r_mask != 0xFF0000 || g_mask != 0xFF00 || b_mask != 0xFF) {
-                    av_log(avctx, AV_LOG_ERROR,
-                           "Invalid or unsupported bitmasks: R=%"PRIX32", G=%"PRIX32", B=%"PRIX32"\n",
-                           r_mask, g_mask, b_mask);
+                    avpriv_report_missing_feature(avctx,
+                                                  "Bitmasks: R=%"PRIX32", G=%"PRIX32", B=%"PRIX32,
+                                                  r_mask, g_mask, b_mask);
                     ret = AVERROR_PATCHWELCOME;
                     goto header_fail;
                 }
diff --git a/libavcodec/g723_1enc.c b/libavcodec/g723_1enc.c
index e7afa4d..4a4525e 100644
--- a/libavcodec/g723_1enc.c
+++ b/libavcodec/g723_1enc.c
@@ -57,7 +57,8 @@ static av_cold int g723_1_encode_init(AVCodecContext *avctx)
     if (avctx->bit_rate == 6300) {
         p->cur_rate = RATE_6300;
     } else if (avctx->bit_rate == 5300) {
-        av_log(avctx, AV_LOG_ERROR, "Bitrate not supported yet, use 6300\n");
+        av_log(avctx, AV_LOG_ERROR, "Use bitrate 6300 instead of 5300.\n");
+        avpriv_report_missing_feature(avctx, "Bitrate 5300");
         return AVERROR_PATCHWELCOME;
     } else {
         av_log(avctx, AV_LOG_ERROR, "Bitrate not supported, use 6300\n");
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index b78ad25..7e66ed7 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -774,8 +774,8 @@ int ff_h264_decode_picture_parameter_set(GetBitContext *gb, AVCodecContext *avct
         ret = AVERROR_INVALIDDATA;
         goto fail;
     } else if (sps->bit_depth_luma == 11 || sps->bit_depth_luma == 13) {
-        av_log(avctx, AV_LOG_ERROR,
-               "Unimplemented luma bit depth=%d\n",
+        avpriv_report_missing_feature(avctx,
+               "Unimplemented luma bit depth=%d",
                sps->bit_depth_luma);
         ret = AVERROR_PATCHWELCOME;
         goto fail;
diff --git a/libavcodec/hevc_ps_enc.c b/libavcodec/hevc_ps_enc.c
index ea06ec7..4c71cf4 100644
--- a/libavcodec/hevc_ps_enc.c
+++ b/libavcodec/hevc_ps_enc.c
@@ -90,9 +90,10 @@ int ff_hevc_encode_nal_vps(HEVCVPS *vps, unsigned int id,
     put_bits(&pb, 6, vps->vps_max_layer_id);
     set_ue_golomb(&pb, vps->vps_num_layer_sets - 1);
 
-    // writing layer_id_included_flag not supported
-    if (vps->vps_num_layer_sets > 1)
+    if (vps->vps_num_layer_sets > 1) {
+        avpriv_report_missing_feature(NULL, "Writing layer_id_included_flag");
         return AVERROR_PATCHWELCOME;
+    }
 
     put_bits(&pb, 1, vps->vps_timing_info_present_flag);
     if (vps->vps_timing_info_present_flag) {
@@ -102,9 +103,10 @@ int ff_hevc_encode_nal_vps(HEVCVPS *vps, unsigned int id,
         if (vps->vps_poc_proportional_to_timing_flag)
             set_ue_golomb(&pb, vps->vps_num_ticks_poc_diff_one - 1);
 
-        // writing HRD parameters not supported
-        if (vps->vps_num_hrd_parameters)
+        if (vps->vps_num_hrd_parameters) {
+            avpriv_report_missing_feature(NULL, "Writing HRD parameters");
             return AVERROR_PATCHWELCOME;
+        }
     }
 
     put_bits(&pb, 1, 0);    // extension flag
diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
index f09f4ba..ce4e2b0 100644
--- a/libavcodec/libopenjpegdec.c
+++ b/libavcodec/libopenjpegdec.c
@@ -540,7 +540,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
         }
         break;
     default:
-        av_log(avctx, AV_LOG_ERROR, "unsupported pixel size %d\n", pixel_size);
+        avpriv_report_missing_feature(avctx, "Pixel size %d", pixel_size);
         ret = AVERROR_PATCHWELCOME;
         goto done;
     }
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 1973132..5470b66 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -586,13 +586,13 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
         break;
     default:
 unk_pixfmt:
-        av_log(s->avctx, AV_LOG_ERROR, "Unhandled pixel format 0x%x bits:%d\n", pix_fmt_id, s->bits);
+        avpriv_report_missing_feature(s->avctx, "Pixel format 0x%x bits:%d", pix_fmt_id, s->bits);
         memset(s->upscale_h, 0, sizeof(s->upscale_h));
         memset(s->upscale_v, 0, sizeof(s->upscale_v));
         return AVERROR_PATCHWELCOME;
     }
     if ((AV_RB32(s->upscale_h) || AV_RB32(s->upscale_v)) && s->avctx->lowres) {
-        av_log(s->avctx, AV_LOG_ERROR, "lowres not supported for weird subsampling\n");
+        avpriv_report_missing_feature(s->avctx, "Lowres for weird subsampling");
         return AVERROR_PATCHWELCOME;
     }
     if (s->ls) {
@@ -1483,8 +1483,9 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
     len = get_bits(&s->gb, 16);
     nb_components = get_bits(&s->gb, 8);
     if (nb_components == 0 || nb_components > MAX_COMPONENTS) {
-        av_log(s->avctx, AV_LOG_ERROR,
-               "decode_sos: nb_components (%d) unsupported\n", nb_components);
+        avpriv_report_missing_feature(s->avctx,
+                                      "decode_sos: nb_components (%d)",
+                                      nb_components);
         return AVERROR_PATCHWELCOME;
     }
     if (len != 6 + 2 * nb_components) {
diff --git a/libavcodec/opus_silk.c b/libavcodec/opus_silk.c
index 4561b5a..bfaf1d7 100644
--- a/libavcodec/opus_silk.c
+++ b/libavcodec/opus_silk.c
@@ -807,7 +807,7 @@ int ff_silk_decode_superframe(SilkContext *s, OpusRangeCoder *rc,
 
         redundancy[i] = ff_opus_rc_dec_log(rc, 1);
         if (redundancy[i]) {
-            av_log(s->avctx, AV_LOG_ERROR, "LBRR frames present; this is unsupported\n");
+            avpriv_report_missing_feature(s->avctx, "LBRR frames");
             return AVERROR_PATCHWELCOME;
         }
     }
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 3157c11..90569bd 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -627,8 +627,8 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
             case FN_BLOCKSIZE: {
                 unsigned blocksize = get_uint(s, av_log2(s->blocksize));
                 if (blocksize > s->blocksize) {
-                    av_log(avctx, AV_LOG_ERROR,
-                           "Increasing block size is not supported\n");
+                    avpriv_report_missing_feature(avctx,
+                                                  "Increasing block size");
                     return AVERROR_PATCHWELCOME;
                 }
                 if (!blocksize || blocksize > MAX_BLOCKSIZE) {
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index 9773281..5dfcca8 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -702,7 +702,7 @@ static int tak_decode_frame(AVCodecContext *avctx, void *data,
 
     if (s->ti.codec != TAK_CODEC_MONO_STEREO &&
         s->ti.codec != TAK_CODEC_MULTICHANNEL) {
-        av_log(avctx, AV_LOG_ERROR, "unsupported codec: %d\n", s->ti.codec);
+        avpriv_report_missing_feature(avctx, "TAK codec type %d", s->ti.codec);
         return AVERROR_PATCHWELCOME;
     }
     if (s->ti.data_type) {
diff --git a/libavcodec/txd.c b/libavcodec/txd.c
index 9b412a7..8b20475 100644
--- a/libavcodec/txd.c
+++ b/libavcodec/txd.c
@@ -56,8 +56,7 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
     flags           = bytestream2_get_byte(&gb);
 
     if (version < 8 || version > 9) {
-        av_log(avctx, AV_LOG_ERROR, "texture data version %u is unsupported\n",
-                                                                    version);
+        avpriv_report_missing_feature(avctx, "Texture data version %u", version);
         return AVERROR_PATCHWELCOME;
     }
 
@@ -66,7 +65,7 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
     } else if (depth == 16 || depth == 32) {
         avctx->pix_fmt = AV_PIX_FMT_RGBA;
     } else {
-        av_log(avctx, AV_LOG_ERROR, "depth of %u is unsupported\n", depth);
+        avpriv_report_missing_feature(avctx, "Color depth of %u", depth);
         return AVERROR_PATCHWELCOME;
     }
 
@@ -149,7 +148,7 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
     return avpkt->size;
 
 unsupported:
-    av_log(avctx, AV_LOG_ERROR, "unsupported d3d format (%08x)\n", d3d_format);
+    avpriv_report_missing_feature(avctx, "d3d format (%08x)", d3d_format);
     return AVERROR_PATCHWELCOME;
 }
 
diff --git a/libavcodec/vp5.c b/libavcodec/vp5.c
index 7e7ec0c..cb08cec 100644
--- a/libavcodec/vp5.c
+++ b/libavcodec/vp5.c
@@ -53,7 +53,7 @@ static int vp5_parse_header(VP56Context *s, const uint8_t *buf, int buf_size)
             return AVERROR_INVALIDDATA;
         vp56_rac_gets(c, 2);
         if (vp56_rac_get(c)) {
-            av_log(s->avctx, AV_LOG_ERROR, "interlacing not supported\n");
+            avpriv_report_missing_feature(s->avctx, "Interlacing");
             return AVERROR_PATCHWELCOME;
         }
         rows = vp56_rac_gets(c, 8);  /* number of stored macroblock rows */
diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c
index 1ed7313..f03d38a 100644
--- a/libavdevice/vfwcap.c
+++ b/libavdevice/vfwcap.c
@@ -387,8 +387,7 @@ static int vfw_read_header(AVFormatContext *s)
     if (par->format == AV_PIX_FMT_NONE) {
         par->codec_id = vfw_codecid(biCompression);
         if (par->codec_id == AV_CODEC_ID_NONE) {
-            av_log(s, AV_LOG_ERROR, "Unknown compression type. "
-                             "Please report verbose (-v 9) debug information.\n");
+            avpriv_report_missing_feature(s, "This compression type");
             vfw_read_close(s);
             return AVERROR_PATCHWELCOME;
         }
diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c
index 2068cd3..1968fe0 100644
--- a/libavdevice/xcbgrab.c
+++ b/libavdevice/xcbgrab.c
@@ -509,7 +509,7 @@ static int pixfmt_from_pixmap_format(AVFormatContext *s, int depth,
 
         fmt++;
     }
-    av_log(s, AV_LOG_ERROR, "Pixmap format not mappable.\n");
+    avpriv_report_missing_feature(s, "Mapping this pixmap format");
 
     return AVERROR_PATCHWELCOME;
 }
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index 91b8c40..e8c0c71 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -368,8 +368,7 @@ static int avi_write_header(AVFormatContext *s)
             // XSUB subtitles behave like video tracks, other subtitles
             // are not (yet) supported.
             if (par->codec_id != AV_CODEC_ID_XSUB) {
-                av_log(s, AV_LOG_ERROR,
-                       "Subtitle streams other than DivX XSUB are not supported by the AVI muxer.\n");
+                avpriv_report_missing_feature(s, "Subtitle streams other than DivX XSUB");
                 return AVERROR_PATCHWELCOME;
             }
         case AVMEDIA_TYPE_VIDEO:
diff --git a/libavformat/lxfdec.c b/libavformat/lxfdec.c
index 99e56f2..9b3eb6a 100644
--- a/libavformat/lxfdec.c
+++ b/libavformat/lxfdec.c
@@ -181,7 +181,7 @@ static int get_packet_header(AVFormatContext *s)
         st->codecpar->bits_per_coded_sample = (audio_format >> 6) & 0x3F;
 
         if (st->codecpar->bits_per_coded_sample != (audio_format & 0x3F)) {
-            av_log(s, AV_LOG_WARNING, "only tightly packed PCM currently supported\n");
+            avpriv_report_missing_feature(s, "Not tightly packed PCM");
             return AVERROR_PATCHWELCOME;
         }
 
@@ -191,8 +191,7 @@ static int get_packet_header(AVFormatContext *s)
         case 24: st->codecpar->codec_id = AV_CODEC_ID_PCM_S24LE_PLANAR; break;
         case 32: st->codecpar->codec_id = AV_CODEC_ID_PCM_S32LE_PLANAR; break;
         default:
-            av_log(s, AV_LOG_WARNING,
-                   "only 16-, 20-, 24- and 32-bit PCM currently supported\n");
+            avpriv_report_missing_feature(s, "PCM not 16-, 20-, 24- or 32-bits");
             return AVERROR_PATCHWELCOME;
         }
 
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 2e2a814..3ec1636 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2548,10 +2548,9 @@ static int matroska_read_header(AVFormatContext *s)
         ebml.max_size        > sizeof(uint64_t)  ||
         ebml.id_length       > sizeof(uint32_t)  ||
         ebml.doctype_version > 3) {
-        av_log(matroska->ctx, AV_LOG_ERROR,
-               "EBML header using unsupported features\n"
-               "(EBML version %"PRIu64", doctype %s, doc version %"PRIu64")\n",
-               ebml.version, ebml.doctype, ebml.doctype_version);
+        avpriv_report_missing_feature(matroska->ctx,
+                                      "EBML version %"PRIu64", doctype %s, doc version %"PRIu64,
+                                      ebml.version, ebml.doctype, ebml.doctype_version);
         ebml_free(ebml_syntax, &ebml);
         return AVERROR_PATCHWELCOME;
     } else if (ebml.doctype_version == 3) {
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index 180c554..f280faa 100644
--- a/libavformat/mpc8.c
+++ b/libavformat/mpc8.c
@@ -239,7 +239,7 @@ static int mpc8_read_header(AVFormatContext *s)
     avio_skip(pb, 4); //CRC
     c->ver = avio_r8(pb);
     if(c->ver != 8){
-        av_log(s, AV_LOG_ERROR, "Unknown stream version %d\n", c->ver);
+        avpriv_report_missing_feature(s, "Stream version %d", c->ver);
         return AVERROR_PATCHWELCOME;
     }
     c->samples = ffio_read_varlen(pb);
diff --git a/libavformat/rsoenc.c b/libavformat/rsoenc.c
index 60ebac8..e34e2c6 100644
--- a/libavformat/rsoenc.c
+++ b/libavformat/rsoenc.c
@@ -50,7 +50,7 @@ static int rso_write_header(AVFormatContext *s)
     }
 
     if (par->codec_id == AV_CODEC_ID_ADPCM_IMA_WAV) {
-        av_log(s, AV_LOG_ERROR, "ADPCM in RSO not implemented\n");
+        avpriv_report_missing_feature(s, "ADPCM in RSO");
         return AVERROR_PATCHWELCOME;
     }
 
diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c
index 05dd172..465d9bc 100644
--- a/libavformat/rtpdec_jpeg.c
+++ b/libavformat/rtpdec_jpeg.c
@@ -247,7 +247,7 @@ static int jpeg_parse_packet(AVFormatContext *ctx, PayloadContext *jpeg,
         type &= ~0x40;
     }
     if (type > 1) {
-        av_log(ctx, AV_LOG_ERROR, "Unimplemented RTP/JPEG type %"PRIu8"\n", type);
+        avpriv_report_missing_feature(ctx, "RTP/JPEG type %"PRIu8, type);
         return AVERROR_PATCHWELCOME;
     }
 
diff --git a/libavformat/rtpdec_latm.c b/libavformat/rtpdec_latm.c
index e51f0cd..a25c07f 100644
--- a/libavformat/rtpdec_latm.c
+++ b/libavformat/rtpdec_latm.c
@@ -109,9 +109,9 @@ static int parse_fmtp_config(AVStream *st, const char *value)
     num_layers        = get_bits(&gb, 3);
     if (audio_mux_version != 0 || same_time_framing != 1 || num_programs != 0 ||
         num_layers != 0) {
-        av_log(NULL, AV_LOG_WARNING, "Unsupported LATM config (%d,%d,%d,%d)\n",
-                                     audio_mux_version, same_time_framing,
-                                     num_programs, num_layers);
+        avpriv_report_missing_feature(NULL, "LATM config (%d,%d,%d,%d)",
+                                      audio_mux_version, same_time_framing,
+                                      num_programs, num_layers);
         ret = AVERROR_PATCHWELCOME;
         goto end;
     }
diff --git a/libavformat/rtpdec_xiph.c b/libavformat/rtpdec_xiph.c
index e1b7990..43de6ce 100644
--- a/libavformat/rtpdec_xiph.c
+++ b/libavformat/rtpdec_xiph.c
@@ -108,15 +108,14 @@ static int xiph_handle_packet(AVFormatContext *ctx, PayloadContext *data,
     }
 
     if (ident != data->ident) {
-        av_log(ctx, AV_LOG_ERROR,
-               "Unimplemented Xiph SDP configuration change detected\n");
+        avpriv_report_missing_feature(ctx, "Xiph SDP configuration change");
         return AVERROR_PATCHWELCOME;
     }
 
     if (tdt) {
-        av_log(ctx, AV_LOG_ERROR,
-               "Unimplemented RTP Xiph packet settings (%d,%d,%d)\n",
-               fragmented, tdt, num_pkts);
+        avpriv_report_missing_feature(ctx,
+                                      "RTP Xiph packet settings (%d,%d,%d)",
+                                      fragmented, tdt, num_pkts);
         return AVERROR_PATCHWELCOME;
     }
 
@@ -246,9 +245,8 @@ parse_packed_headers(AVFormatContext *s,
     length2            = get_base128(&packed_headers, packed_headers_end);
 
     if (num_packed != 1 || num_headers > 3) {
-        av_log(s, AV_LOG_ERROR,
-               "Unimplemented number of headers: %u packed headers, %u headers\n",
-               num_packed, num_headers);
+        avpriv_report_missing_feature(s, "%u packed headers, %u headers",
+                                      num_packed, num_headers);
         return AVERROR_PATCHWELCOME;
     }
 
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index c6292c5..261e970 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1340,8 +1340,7 @@ static int rtsp_send_cmd_with_content_async(AVFormatContext *s,
     ffurl_write(rt->rtsp_hd_out, out_buf, strlen(out_buf));
     if (send_content_length > 0 && send_content) {
         if (rt->control_transport == RTSP_MODE_TUNNEL) {
-            av_log(s, AV_LOG_ERROR, "tunneling of RTSP requests "
-                                    "with content data not supported\n");
+            avpriv_report_missing_feature(s, "Tunneling of RTSP requests with content data");
             return AVERROR_PATCHWELCOME;
         }
         ffurl_write(rt->rtsp_hd_out, send_content, send_content_length);
diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c
index daf1c1f..b47ec12 100644
--- a/libavformat/spdifenc.c
+++ b/libavformat/spdifenc.c
@@ -470,7 +470,8 @@ static int spdif_write_header(AVFormatContext *s)
             return AVERROR(ENOMEM);
         break;
     default:
-        av_log(s, AV_LOG_ERROR, "codec not supported\n");
+        avpriv_report_missing_feature(s, "Codec %d",
+                                      s->streams[0]->codecpar->codec_id);
         return AVERROR_PATCHWELCOME;
     }
     return 0;
diff --git a/libavformat/wvdec.c b/libavformat/wvdec.c
index 261fcaf..8252656 100644
--- a/libavformat/wvdec.c
+++ b/libavformat/wvdec.c
@@ -98,7 +98,8 @@ static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb)
     }
 
     if (wc->header.version < 0x402 || wc->header.version > 0x410) {
-        av_log(ctx, AV_LOG_ERROR, "Unsupported version %03X\n", wc->header.version);
+        avpriv_report_missing_feature(ctx, "WV version 0x%03X",
+                                      wc->header.version);
         return AVERROR_PATCHWELCOME;
     }
 


======================================================================

diff --cc libavcodec/alac.c
index ae1204b,83d777c..d6bd21b
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@@ -250,8 -265,8 +250,8 @@@ static int decode_element(AVCodecContex
  
      alac->extra_bits = get_bits(&alac->gb, 2) << 3;
      bps = alac->sample_size - alac->extra_bits + channels - 1;
 -    if (bps > 32) {
 +    if (bps > 32U) {
-         av_log(avctx, AV_LOG_ERROR, "bps is unsupported: %d\n", bps);
+         avpriv_report_missing_feature(avctx, "bps %d", bps);
          return AVERROR_PATCHWELCOME;
      }
  
@@@ -582,9 -567,9 +582,9 @@@ static av_cold int alac_decode_init(AVC
          else
              avctx->channels = alac->channels;
      }
 -    if (avctx->channels > ALAC_MAX_CHANNELS) {
 +    if (avctx->channels > ALAC_MAX_CHANNELS || avctx->channels <= 0 ) {
-         av_log(avctx, AV_LOG_ERROR, "Unsupported channel count: %d\n",
-                avctx->channels);
+         avpriv_report_missing_feature(avctx, "Channel count %d",
+                                       avctx->channels);
          return AVERROR_PATCHWELCOME;
      }
      avctx->channel_layout = ff_alac_channel_layouts[alac->channels - 1];
diff --cc libavcodec/fraps.c
index d5fb919,55051ff..7a7673f
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@@ -156,13 -159,11 +156,11 @@@ static int decode_frame(AVCodecContext 
  
      header      = AV_RL32(buf);
      version     = header & 0xff;
 +    is_pal      = buf[1] == 2 && version == 1;
      header_size = (header & (1<<30))? 8 : 4; /* bit 30 means pad to 8 bytes */
 -    prev_pic_bit = header & (1U << 31); /* bit 31 means same as previous pic */
  
      if (version > 5) {
-         av_log(avctx, AV_LOG_ERROR,
-                "This file is encoded with Fraps version %u. "
-                "This codec can only decode versions <= 5.\n", version);
+         avpriv_report_missing_feature(avctx, "Fraps version %u", version);
          return AVERROR_PATCHWELCOME;
      }
  
diff --cc libavcodec/g2meet.c
index b0af3ec,7e90916..10b6808
--- a/libavcodec/g2meet.c
+++ b/libavcodec/g2meet.c
@@@ -1442,11 -1424,9 +1442,10 @@@ static int g2m_decode_frame(AVCodecCont
              }
              c->compression = bytestream2_get_be32(&bc);
              if (c->compression != 2 && c->compression != 3) {
-                 av_log(avctx, AV_LOG_ERROR,
-                        "Unknown compression method %d\n",
-                        c->compression);
+                 avpriv_report_missing_feature(avctx, "Compression method %d",
+                                               c->compression);
 -                return AVERROR_PATCHWELCOME;
 +                ret = AVERROR_PATCHWELCOME;
 +                goto header_fail;
              }
              c->tile_width  = bytestream2_get_be32(&bc);
              c->tile_height = bytestream2_get_be32(&bc);
@@@ -1475,11 -1452,10 +1474,11 @@@
                  g_mask = bytestream2_get_be32(&bc);
                  b_mask = bytestream2_get_be32(&bc);
                  if (r_mask != 0xFF0000 || g_mask != 0xFF00 || b_mask != 0xFF) {
-                     av_log(avctx, AV_LOG_ERROR,
-                            "Invalid or unsupported bitmasks: R=%"PRIX32", G=%"PRIX32", B=%"PRIX32"\n",
-                            r_mask, g_mask, b_mask);
+                     avpriv_report_missing_feature(avctx,
+                                                   "Bitmasks: R=%"PRIX32", G=%"PRIX32", B=%"PRIX32,
+                                                   r_mask, g_mask, b_mask);
 -                    return AVERROR_PATCHWELCOME;
 +                    ret = AVERROR_PATCHWELCOME;
 +                    goto header_fail;
                  }
              } else {
                  avpriv_request_sample(avctx, "bpp=%d", c->bpp);
diff --cc libavcodec/h264_ps.c
index b78ad25,37c3be1..7e66ed7
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@@ -766,17 -697,11 +766,17 @@@ int ff_h264_decode_picture_parameter_se
          ret = AVERROR_INVALIDDATA;
          goto fail;
      }
 -    sps = (SPS*)ps->sps_list[pps->sps_id]->data;
 -
 -    if (sps->bit_depth_luma > 10) {
 -        avpriv_report_missing_feature(avctx, "Luma bit depth=%d (max=10)",
 -                                      sps->bit_depth_luma);
 +    sps = (const SPS*)ps->sps_list[pps->sps_id]->data;
 +    if (sps->bit_depth_luma > 14) {
 +        av_log(avctx, AV_LOG_ERROR,
 +               "Invalid luma bit depth=%d\n",
 +               sps->bit_depth_luma);
 +        ret = AVERROR_INVALIDDATA;
 +        goto fail;
 +    } else if (sps->bit_depth_luma == 11 || sps->bit_depth_luma == 13) {
-         av_log(avctx, AV_LOG_ERROR,
-                "Unimplemented luma bit depth=%d\n",
++        avpriv_report_missing_feature(avctx,
++               "Unimplemented luma bit depth=%d",
 +               sps->bit_depth_luma);
          ret = AVERROR_PATCHWELCOME;
          goto fail;
      }
diff --cc libavcodec/mjpegdec.c
index 1973132,a4a6c63..5470b66
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@@ -585,14 -373,7 +585,14 @@@ int ff_mjpeg_decode_sof(MJpegDecodeCont
          s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG;
          break;
      default:
 -        avpriv_report_missing_feature(s->avctx, "Pixel format 0x%x", pix_fmt_id);
 +unk_pixfmt:
-         av_log(s->avctx, AV_LOG_ERROR, "Unhandled pixel format 0x%x bits:%d\n", pix_fmt_id, s->bits);
++        avpriv_report_missing_feature(s->avctx, "Pixel format 0x%x bits:%d", pix_fmt_id, s->bits);
 +        memset(s->upscale_h, 0, sizeof(s->upscale_h));
 +        memset(s->upscale_v, 0, sizeof(s->upscale_v));
 +        return AVERROR_PATCHWELCOME;
 +    }
 +    if ((AV_RB32(s->upscale_h) || AV_RB32(s->upscale_v)) && s->avctx->lowres) {
-         av_log(s->avctx, AV_LOG_ERROR, "lowres not supported for weird subsampling\n");
++        avpriv_report_missing_feature(s->avctx, "Lowres for weird subsampling");
          return AVERROR_PATCHWELCOME;
      }
      if (s->ls) {
diff --cc libavcodec/opus_silk.c
index 4561b5a,5db1b26..bfaf1d7
--- a/libavcodec/opus_silk.c
+++ b/libavcodec/opus_silk.c
@@@ -803,11 -1526,11 +803,11 @@@ int ff_silk_decode_superframe(SilkConte
      /* read the LP-layer header bits */
      for (i = 0; i < coded_channels; i++) {
          for (j = 0; j < nb_frames; j++)
 -            active[i][j] = opus_rc_p2model(rc, 1);
 +            active[i][j] = ff_opus_rc_dec_log(rc, 1);
  
 -        redundancy[i] = opus_rc_p2model(rc, 1);
 +        redundancy[i] = ff_opus_rc_dec_log(rc, 1);
          if (redundancy[i]) {
-             av_log(s->avctx, AV_LOG_ERROR, "LBRR frames present; this is unsupported\n");
+             avpriv_report_missing_feature(s->avctx, "LBRR frames");
              return AVERROR_PATCHWELCOME;
          }
      }
diff --cc libavformat/matroskadec.c
index 2e2a814,8016730..3ec1636
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@@ -2548,17 -1947,11 +2548,16 @@@ static int matroska_read_header(AVForma
          ebml.max_size        > sizeof(uint64_t)  ||
          ebml.id_length       > sizeof(uint32_t)  ||
          ebml.doctype_version > 3) {
-         av_log(matroska->ctx, AV_LOG_ERROR,
-                "EBML header using unsupported features\n"
-                "(EBML version %"PRIu64", doctype %s, doc version %"PRIu64")\n",
-                ebml.version, ebml.doctype, ebml.doctype_version);
+         avpriv_report_missing_feature(matroska->ctx,
+                                       "EBML version %"PRIu64", doctype %s, doc version %"PRIu64,
+                                       ebml.version, ebml.doctype, ebml.doctype_version);
          ebml_free(ebml_syntax, &ebml);
          return AVERROR_PATCHWELCOME;
 +    } else if (ebml.doctype_version == 3) {
 +        av_log(matroska->ctx, AV_LOG_WARNING,
 +               "EBML header using unsupported features\n"
 +               "(EBML version %"PRIu64", doctype %s, doc version %"PRIu64")\n",
 +               ebml.version, ebml.doctype, ebml.doctype_version);
      }
      for (i = 0; i < FF_ARRAY_ELEMS(matroska_doctypes); i++)
          if (!strcmp(ebml.doctype, matroska_doctypes[i]))
diff --cc libavformat/rtpdec_jpeg.c
index 05dd172,c3e5c8d..465d9bc
--- a/libavformat/rtpdec_jpeg.c
+++ b/libavformat/rtpdec_jpeg.c
@@@ -236,18 -229,8 +236,18 @@@ static int jpeg_parse_packet(AVFormatCo
      buf += 8;
      len -= 8;
  
 +    if (type & 0x40) {
 +        if (len < 4) {
 +            av_log(ctx, AV_LOG_ERROR, "Too short RTP/JPEG packet.\n");
 +            return AVERROR_INVALIDDATA;
 +        }
 +        dri = AV_RB16(buf);
 +        buf += 4;
 +        len -= 4;
 +        type &= ~0x40;
 +    }
      if (type > 1) {
-         av_log(ctx, AV_LOG_ERROR, "Unimplemented RTP/JPEG type %"PRIu8"\n", type);
+         avpriv_report_missing_feature(ctx, "RTP/JPEG type %"PRIu8, type);
          return AVERROR_PATCHWELCOME;
      }
  



More information about the ffmpeg-cvslog mailing list