diff --git a/libavformat/anm.c b/libavformat/anm.c
index 79d31c1671a77269ce8e070582d553c1fb0d04e7..1c585750e617cd9972779eaef61077aec3fdb559 100644
--- a/libavformat/anm.c
+++ b/libavformat/anm.c
@@ -85,7 +85,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");
+        avpriv_request_sample(s, "max_pages != " AV_STRINGIFY(MAX_PAGES));
         return AVERROR_PATCHWELCOME;
     }
 
@@ -163,7 +163,7 @@ static int read_header(AVFormatContext *s)
     return 0;
 
 invalid:
-    av_log_ask_for_sample(s, "Invalid header element encountered.\n");
+    avpriv_request_sample(s, "Invalid header element");
     return AVERROR_PATCHWELCOME;
 }
 
diff --git a/libavformat/au.c b/libavformat/au.c
index db2ab275587d96da55ebaf76b8067c94e0eaa68a..a29e80203b1e0b22e92bf7a6b079751b8ac59524 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -96,13 +96,13 @@ static int au_read_header(AVFormatContext *s)
     codec = ff_codec_get_id(codec_au_tags, id);
 
     if (codec == AV_CODEC_ID_NONE) {
-        av_log_ask_for_sample(s, "unknown or unsupported codec tag: %u\n", id);
+        avpriv_request_sample(s, "unknown or unsupported codec tag: %u", id);
         return AVERROR_PATCHWELCOME;
     }
 
     bps = av_get_bits_per_sample(codec);
     if (!bps) {
-        av_log_ask_for_sample(s, "could not determine bits per sample\n");
+        avpriv_request_sample(s, "Unknown bits per sample");
         return AVERROR_PATCHWELCOME;
     }
 
diff --git a/libavformat/bethsoftvid.c b/libavformat/bethsoftvid.c
index caff7abf3fb97e802f07440438cf5f00d88a7a57..b8f08c1f873d14993f064f4c1f5a0dc27f9f7943 100644
--- a/libavformat/bethsoftvid.c
+++ b/libavformat/bethsoftvid.c
@@ -108,8 +108,9 @@ static int read_frame(BVID_DemuxContext *vid, AVIOContext *pb, AVPacket *pkt,
             return AVERROR(ENOMEM);
         vid->video_index = st->index;
         if (vid->audio_index < 0) {
-            av_log_ask_for_sample(s, "No audio packet before first video "
-                                  "packet. Using default video time base.\n");
+            avpriv_request_sample(s, "Using default video time base since "
+                                  "having no audio packet before the first "
+                                  "video packet");
         }
         avpriv_set_pts_info(st, 64, 185, vid->sample_rate);
         st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
diff --git a/libavformat/filmstripdec.c b/libavformat/filmstripdec.c
index aa41fa45c50f9e5c2972c0656ac12e6dd7ecce59..1cd1a4837bf4ac9b202f22ecf72356f59f22059f 100644
--- a/libavformat/filmstripdec.c
+++ b/libavformat/filmstripdec.c
@@ -55,7 +55,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");
+        avpriv_request_sample(s, "Unsupported packing method");
         return AVERROR_PATCHWELCOME;
     }
 
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 137f79b331af08050c7056c3de92058e84cadd12..577c0e9867168d993c7c932a81e4e75b66cfe7a1 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -835,7 +835,7 @@ static int mov_read_mdhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 
     version = avio_r8(pb);
     if (version > 1) {
-        av_log_ask_for_sample(c->fc, "unsupported version %d\n", version);
+        avpriv_request_sample(c->fc, "Version %d", version);
         return AVERROR_PATCHWELCOME;
     }
     avio_rb24(pb); /* flags */
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 8be9a32d8a025a7950c81ce9dd9c831d178b33d0..d413d54fd63ed7966ed9bf193276e8e1c6451297 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1388,7 +1388,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
         }
         if (st->codec->extradata) {
             if (st->codec->extradata_size == 4 && memcmp(st->codec->extradata, *pp, 4))
-                av_log_ask_for_sample(fc, "DVB sub with multiple IDs\n");
+                avpriv_request_sample(fc, "DVB sub with multiple IDs");
         } else {
             st->codec->extradata = av_malloc(4 + FF_INPUT_BUFFER_PADDING_SIZE);
             if (st->codec->extradata) {
diff --git a/libavformat/mtv.c b/libavformat/mtv.c
index 5f39ec53685893a30a374275716ddd11f26c1d61..6ffbb51ff2c8bf01c26939f3498426e67ff110bd 100644
--- a/libavformat/mtv.c
+++ b/libavformat/mtv.c
@@ -114,7 +114,7 @@ static int mtv_read_header(AVFormatContext *s)
     audio_subsegments = avio_rl16(pb);
 
     if (audio_subsegments == 0) {
-        av_log_ask_for_sample(s, "MTV files without audio are not supported\n");
+        avpriv_request_sample(s, "MTV files without audio");
         return AVERROR_PATCHWELCOME;
     }
 
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 7dfdbfd2fbdd2dc2757d7cd155ccc9a6cff85efc..0a81d167627c2eb85c908726355f6b23afb21b89 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -411,8 +411,7 @@ static int mxf_read_primer_pack(void *arg, AVIOContext *pb, int tag, int size, U
     int item_len = avio_rb32(pb);
 
     if (item_len != 18) {
-        av_log_ask_for_sample(pb, "unsupported primer pack item length %d\n",
-                              item_len);
+        avpriv_request_sample(pb, "Primer pack item length %d", item_len);
         return AVERROR_PATCHWELCOME;
     }
     if (item_num > 65536) {
@@ -2127,9 +2126,11 @@ static int mxf_read_packet_old(AVFormatContext *s, AVPacket *pkt)
             if (next_ofs >= 0 && next_klv > next_ofs) {
                 /* if this check is hit then it's possible OPAtom was treated as OP1a
                  * truncate the packet since it's probably very large (>2 GiB is common) */
-                av_log_ask_for_sample(s,
-                    "KLV for edit unit %i extends into next edit unit - OPAtom misinterpreted as OP1a?\n",
-                    mxf->current_edit_unit);
+                avpriv_request_sample(s,
+                                      "OPAtom misinterpreted as OP1a?"
+                                      "KLV for edit unit %i extending into "
+                                      "next edit unit",
+                                      mxf->current_edit_unit);
                 klv.length = next_ofs - avio_tell(s->pb);
             }
 
diff --git a/libavformat/omadec.c b/libavformat/omadec.c
index 8d29675c1c05a65fe562eaffa80bd41f70799528..9f65db05e2303c68e3d45e5e28d202ba12286fae 100644
--- a/libavformat/omadec.c
+++ b/libavformat/omadec.c
@@ -311,8 +311,7 @@ static int oma_read_header(AVFormatContext *s)
         case OMA_CODECID_ATRAC3:
             samplerate = ff_oma_srate_tab[(codec_params >> 13) & 7]*100;
             if (samplerate != 44100)
-                av_log_ask_for_sample(s, "Unsupported sample rate: %d\n",
-                                      samplerate);
+                avpriv_request_sample(s, "Sample rate %d", samplerate);
 
             framesize = (codec_params & 0x3FF) * 8;
             jsflag = (codec_params >> 17) & 1; /* get stereo coding mode, 1 for joint-stereo */
diff --git a/libavformat/rsodec.c b/libavformat/rsodec.c
index aae80a82215ddf4520513dd7cc5353f4ae22dac5..b96421762a7c5694ef657f7c390146bb36545f3e 100644
--- a/libavformat/rsodec.c
+++ b/libavformat/rsodec.c
@@ -49,7 +49,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");
+        avpriv_request_sample(s, "Unknown bits per sample");
         return AVERROR_PATCHWELCOME;
     }
 
diff --git a/libavformat/rtpdec_latm.c b/libavformat/rtpdec_latm.c
index bacc186c49bb98d41f138ec301fe5a3b461a6964..a2ad07104ad3bfda2e5e454606a8614308c41714 100644
--- a/libavformat/rtpdec_latm.c
+++ b/libavformat/rtpdec_latm.c
@@ -157,8 +157,8 @@ static int parse_fmtp(AVStream *stream, PayloadContext *data,
     } else if (!strcmp(attr, "cpresent")) {
         int cpresent = atoi(value);
         if (cpresent != 0)
-            av_log_missing_feature(NULL, "RTP MP4A-LATM with in-band "
-                                         "configuration", 1);
+            avpriv_request_sample(NULL,
+                                  "RTP MP4A-LATM with in-band configuration");
     }
 
     return 0;
diff --git a/libavformat/rtpdec_qt.c b/libavformat/rtpdec_qt.c
index 2d2c0fe43bfe44180b00c69f6c36d7bbe0014027..8e887a511bc09c65a489921c8ff1a809a4bc929a 100644
--- a/libavformat/rtpdec_qt.c
+++ b/libavformat/rtpdec_qt.c
@@ -97,8 +97,8 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
         is_start  = get_bits1(&gb);
         is_finish = get_bits1(&gb);
         if (!is_start || !is_finish) {
-            av_log_missing_feature(s, "RTP-X-QT with payload description "
-                                      "split over several packets", 1);
+            avpriv_request_sample(s, "RTP-X-QT with payload description "
+                                  "split over several packets");
             return AVERROR_PATCHWELCOME;
         }
         skip_bits(&gb, 12); // reserved
@@ -161,7 +161,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
         avio_seek(&pb, 4, SEEK_SET);
 
     if (has_packet_info) {
-        av_log_missing_feature(s, "RTP-X-QT with packet specific info", 1);
+        avpriv_request_sample(s, "RTP-X-QT with packet-specific info");
         return AVERROR_PATCHWELCOME;
     }
 
@@ -226,7 +226,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
         return 0;
 
     default:  /* unimplemented */
-        av_log_missing_feature(NULL, "RTP-X-QT with packing scheme 2", 1);
+        avpriv_request_sample(NULL, "RTP-X-QT with packing scheme 2");
         return AVERROR_PATCHWELCOME;
     }
 }
diff --git a/libavformat/smjpegdec.c b/libavformat/smjpegdec.c
index f32f635d5fe61f5e55c81f8f922b5560f68353d6..38ac2fb0861c08f9f681244b009f67a771a7b677 100644
--- a/libavformat/smjpegdec.c
+++ b/libavformat/smjpegdec.c
@@ -52,7 +52,7 @@ static int smjpeg_read_header(AVFormatContext *s)
     avio_skip(pb, 8); // magic
     version = avio_rb32(pb);
     if (version)
-        av_log_ask_for_sample(s, "unknown version %d\n", version);
+        avpriv_request_sample(s, "Unknown version %d", version);
 
     duration = avio_rb32(pb); // in msec
 
@@ -77,7 +77,7 @@ static int smjpeg_read_header(AVFormatContext *s)
             break;
         case SMJPEG_SND:
             if (ast) {
-                av_log_ask_for_sample(s, "multiple audio streams not supported\n");
+                avpriv_request_sample(s, "Multiple audio streams");
                 return AVERROR_PATCHWELCOME;
             }
             hlength = avio_rb32(pb);
@@ -100,7 +100,7 @@ static int smjpeg_read_header(AVFormatContext *s)
             break;
         case SMJPEG_VID:
             if (vst) {
-                av_log_ask_for_sample(s, "multiple video streams not supported\n");
+                avpriv_request_sample(s, "Multiple video streams");
                 return AVERROR_INVALIDDATA;
             }
             hlength = avio_rb32(pb);
diff --git a/libavformat/spdifdec.c b/libavformat/spdifdec.c
index 36fe4bac2a7b737a9efa8fb89ed9a39cbcca57f8..726a85cbe58620c9ec4279f21a277cba2caed6d4 100644
--- a/libavformat/spdifdec.c
+++ b/libavformat/spdifdec.c
@@ -91,8 +91,8 @@ static int spdif_get_offset_and_codec(AVFormatContext *s,
         break;
     default:
         if (s) { /* be silent during a probe */
-            av_log(s, AV_LOG_WARNING, "Data type 0x%04x", data_type);
-            av_log_missing_feature(s, " in IEC 61937", 1);
+            avpriv_request_sample(s, "Data type 0x%04x in IEC 61937",
+                                  data_type);
         }
         return AVERROR_PATCHWELCOME;
     }
@@ -184,7 +184,7 @@ int ff_spdif_read_packet(AVFormatContext *s, AVPacket *pkt)
     pkt_size_bits = avio_rl16(pb);
 
     if (pkt_size_bits % 16)
-        av_log_ask_for_sample(s, "Packet does not end to a 16-bit boundary.");
+        avpriv_request_sample(s, "Packet not ending at a 16-bit boundary");
 
     ret = av_new_packet(pkt, FFALIGN(pkt_size_bits, 16) >> 3);
     if (ret)
diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c
index 41ed7247598c74ee4b650b08cde10a9be705fc5c..778ab88a154370a713423c08442fff5efad19369 100644
--- a/libavformat/spdifenc.c
+++ b/libavformat/spdifenc.c
@@ -307,7 +307,7 @@ static int spdif_header_dts(AVFormatContext *s, AVPacket *pkt)
          * discs and dts-in-wav. */
         ctx->use_preamble = 0;
     } else if (ctx->out_bytes > ctx->pkt_offset - BURST_HEADER_SIZE) {
-        av_log_ask_for_sample(s, "Unrecognized large DTS frame.");
+        avpriv_request_sample(s, "Unrecognized large DTS frame");
         /* This will fail with a "bitrate too high" in the caller */
     }
 
@@ -412,7 +412,8 @@ static int spdif_header_truehd(AVFormatContext *s, AVPacket *pkt)
     if (pkt->size > TRUEHD_FRAME_OFFSET - mat_code_length) {
         /* if such frames exist, we'd need some more complex logic to
          * distribute the TrueHD frames in the MAT frame */
-        av_log_ask_for_sample(s, "TrueHD frame too big, %d bytes\n", pkt->size);
+        avpriv_request_sample(s, "Too large TrueHD frame of %d bytes",
+                              pkt->size);
         return AVERROR_PATCHWELCOME;
     }
 
diff --git a/libavformat/westwood_aud.c b/libavformat/westwood_aud.c
index f4b8584b26f48eb296700bc6e67500af87a88072..d66611758be4208e13ff2ac1497a8bebc7c48e6e 100644
--- a/libavformat/westwood_aud.c
+++ b/libavformat/westwood_aud.c
@@ -102,7 +102,7 @@ static int wsaud_read_header(AVFormatContext *s)
     switch (codec) {
     case  1:
         if (channels != 1) {
-            av_log_ask_for_sample(s, "Stereo WS-SND1 is not supported.\n");
+            avpriv_request_sample(s, "Stereo WS-SND1");
             return AVERROR_PATCHWELCOME;
         }
         st->codec->codec_id = AV_CODEC_ID_WESTWOOD_SND1;
@@ -113,7 +113,7 @@ static int wsaud_read_header(AVFormatContext *s)
         st->codec->bit_rate = channels * sample_rate * 4;
         break;
     default:
-        av_log_ask_for_sample(s, "Unknown codec: %d\n", codec);
+        avpriv_request_sample(s, "Unknown codec: %d", codec);
         return AVERROR_PATCHWELCOME;
     }
     avpriv_set_pts_info(st, 64, 1, sample_rate);
diff --git a/libavformat/xmv.c b/libavformat/xmv.c
index b447d6cd25caf3f82ae160d7c342582daf55e9d3..e970477339ec6a41d30f97221bdc0f1309ef92a9 100644
--- a/libavformat/xmv.c
+++ b/libavformat/xmv.c
@@ -143,7 +143,7 @@ static int xmv_read_header(AVFormatContext *s)
 
     file_version = avio_rl32(pb);
     if ((file_version != 4) && (file_version != 2))
-        av_log_ask_for_sample(s, "Found uncommon version %d\n", file_version);
+        avpriv_request_sample(s, "Uncommon version %d", file_version);
 
 
     /* Video track */
diff --git a/libavformat/xwma.c b/libavformat/xwma.c
index 1a1e6e3844eb662450baf9cdde286cc75f6d1c67..0d40bd76c8836948dceafb34182042630357e040 100644
--- a/libavformat/xwma.c
+++ b/libavformat/xwma.c
@@ -85,7 +85,7 @@ static int xwma_read_header(AVFormatContext *s)
      * anyway.
      */
     if (st->codec->codec_id != AV_CODEC_ID_WMAV2) {
-        av_log_ask_for_sample(s, "unexpected codec (tag 0x04%x; id %d)\n",
+        avpriv_request_sample(s, "Unexpected codec (tag 0x04%x; id %d)",
                               st->codec->codec_tag, st->codec->codec_id);
     } else {
         /* In all xWMA files I have seen, there is no extradata. But the WMA
@@ -100,7 +100,7 @@ static int xwma_read_header(AVFormatContext *s)
              * if it will work, but just go on and try it, after asking
              * the user for a sample.
              */
-            av_log_ask_for_sample(s, "unexpected extradata (%d bytes)\n",
+            avpriv_request_sample(s, "Unexpected extradata (%d bytes)",
                                   st->codec->extradata_size);
         } else {
             st->codec->extradata_size = 6;