Browse code

lavc & lavf: replace deprecated av_log* functions

Signed-off-by: Paul B Mahol <onemda@gmail.com>

Paul B Mahol authored on 2013/03/16 02:13:52
Showing 31 changed files
... ...
@@ -30,7 +30,7 @@ static av_cold int zero12v_decode_init(AVCodecContext *avctx)
30 30
     avctx->bits_per_raw_sample = 10;
31 31
 
32 32
     if (avctx->codec_tag == MKTAG('a', '1', '2', 'v'))
33
-        av_log_ask_for_sample(avctx, "Samples with actual transparency needed\n");
33
+        avpriv_request_sample(avctx, "transparency");
34 34
 
35 35
     return 0;
36 36
 }
... ...
@@ -323,7 +323,7 @@ static int xa_decode(AVCodecContext *avctx, int16_t *out0, int16_t *out1,
323 323
         shift  = 12 - (in[4+i*2] & 15);
324 324
         filter = in[4+i*2] >> 4;
325 325
         if (filter >= FF_ARRAY_ELEMS(xa_adpcm_table)) {
326
-            av_log_ask_for_sample(avctx, "unknown XA-ADPCM filter %d\n", filter);
326
+            avpriv_request_sample(avctx, "unknown XA-ADPCM filter %d", filter);
327 327
             filter=0;
328 328
         }
329 329
         f0 = xa_adpcm_table[filter][0];
... ...
@@ -352,7 +352,7 @@ static int xa_decode(AVCodecContext *avctx, int16_t *out0, int16_t *out1,
352 352
         shift  = 12 - (in[5+i*2] & 15);
353 353
         filter = in[5+i*2] >> 4;
354 354
         if (filter >= FF_ARRAY_ELEMS(xa_adpcm_table)) {
355
-            av_log_ask_for_sample(avctx, "unknown XA-ADPCM filter %d\n", filter);
355
+            avpriv_request_sample(avctx, "unknown XA-ADPCM filter %d", filter);
356 356
             filter=0;
357 357
         }
358 358
 
... ...
@@ -342,7 +342,7 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx)
342 342
     }
343 343
 
344 344
     if (avctx->block_align <= 0) {
345
-        av_log_ask_for_sample(avctx, "unsupported block align\n");
345
+        av_log(avctx, AV_LOG_ERROR, "Unsupported block align.");
346 346
         return AVERROR_PATCHWELCOME;
347 347
     }
348 348
 
... ...
@@ -1202,7 +1202,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
1202 1202
             return AVERROR_PATCHWELCOME;
1203 1203
         }
1204 1204
         if (q->subpacket[s].subbands == 0) {
1205
-            av_log_ask_for_sample(avctx, "subbands is 0\n");
1205
+            avpriv_request_sample(avctx, "subbands = 0");
1206 1206
             return AVERROR_PATCHWELCOME;
1207 1207
         }
1208 1208
         q->subpacket[s].gains1.now      = q->subpacket[s].gain_1;
... ...
@@ -739,7 +739,7 @@ static int dca_parse_frame_header(DCAContext *s)
739 739
 
740 740
     if (s->lfe == 3) {
741 741
         s->lfe = 0;
742
-        av_log_ask_for_sample(s->avctx, "LFE is 3\n");
742
+        avpriv_request_sample(s->avctx, "LFE = 3");
743 743
         return AVERROR_PATCHWELCOME;
744 744
     }
745 745
 
... ...
@@ -1012,7 +1012,7 @@ static int dca_subframe_header(DCAContext *s, int base_channel, int block_index)
1012 1012
         /* Scale factor index */
1013 1013
         quant7 = get_bits(&s->gb, 8);
1014 1014
         if (quant7 > 127) {
1015
-            av_log_ask_for_sample(s->avctx, "LFEScaleIndex larger than 127\n");
1015
+            avpriv_request_sample(s->avctx, "LFEScaleIndex larger than 127");
1016 1016
             return AVERROR_INVALIDDATA;
1017 1017
         }
1018 1018
         s->lfe_scale_factor = scale_factor_quant7[quant7];
... ...
@@ -2167,7 +2167,7 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data,
2167 2167
                 }
2168 2168
 
2169 2169
                 if (s->xch_base_channel < 2) {
2170
-                    av_log_ask_for_sample(avctx, "XCh with fewer than 2 base channels is not supported\n");
2170
+                    avpriv_request_sample(avctx, "XCh with fewer than 2 base channels");
2171 2171
                     continue;
2172 2172
                 }
2173 2173
 
... ...
@@ -697,7 +697,7 @@ static int decode_frame(AVCodecContext *avctx,
697 697
             avctx->pix_fmt = AV_PIX_FMT_RGB48;
698 698
         break;
699 699
     case EXR_UINT:
700
-        av_log_missing_feature(avctx, "32-bit unsigned int", 1);
700
+        avpriv_request_sample(avctx, "32-bit unsigned int");
701 701
         return AVERROR_PATCHWELCOME;
702 702
     default:
703 703
         av_log(avctx, AV_LOG_ERROR, "Missing channel list\n");
... ...
@@ -345,7 +345,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
345 345
             } else if (avctx->bits_per_coded_sample == 32) {
346 346
                 avctx->pix_fmt = AV_PIX_FMT_BGR32;
347 347
             } else {
348
-                av_log_ask_for_sample(avctx, "unknown bits_per_coded_sample\n");
348
+                avpriv_request_sample(avctx, "unknown bits_per_coded_sample");
349 349
                 return AVERROR_PATCHWELCOME;
350 350
             }
351 351
         }
... ...
@@ -646,7 +646,7 @@ static void decode_deep_tvdc32(uint8_t *dst, const uint8_t *src, int src_size, i
646 646
 static int unsupported(AVCodecContext *avctx)
647 647
 {
648 648
     IffContext *s = avctx->priv_data;
649
-    av_log_ask_for_sample(avctx, "unsupported bitmap (compression %i, bpp %i, ham %i)\n", s->compression, s->bpp, s->ham);
649
+    avpriv_request_sample(avctx, "bitmap (compression %i, bpp %i, ham %i)", s->compression, s->bpp, s->ham);
650 650
     return AVERROR_INVALIDDATA;
651 651
 }
652 652
 
... ...
@@ -330,7 +330,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
330 330
 
331 331
     if (s->interlaced && (s->bottom_field == !s->interlace_polarity)) {
332 332
         if (s->progressive) {
333
-            av_log_ask_for_sample(s->avctx, "progressively coded interlaced pictures not supported\n");
333
+            avpriv_request_sample(s->avctx, "progressively coded interlaced picture");
334 334
             return AVERROR_INVALIDDATA;
335 335
         }
336 336
     } else{
... ...
@@ -209,7 +209,7 @@ static void ff_compute_band_indexes(MPADecodeContext *s, GranuleDef *g)
209 209
     if (g->block_type == 2) {
210 210
         if (g->switch_point) {
211 211
             if(s->sample_rate_index == 8)
212
-                av_log_ask_for_sample(s->avctx, "switch point in 8khz\n");
212
+                avpriv_request_sample(s->avctx, "switch point in 8khz");
213 213
             /* if switched mode, we handle the 36 first samples as
214 214
                 long blocks.  For 8000Hz, we handle the 72 first
215 215
                 exponents as long blocks */
... ...
@@ -150,7 +150,7 @@ static int decode_mvc2(AVCodecContext *avctx, GetByteContext *gb, uint8_t *dst_s
150 150
         av_log(avctx, AV_LOG_WARNING, "dimension mismatch\n");
151 151
 
152 152
     if (bytestream2_get_byteu(gb)) {
153
-        av_log_ask_for_sample(avctx, "bitmap feature\n");
153
+        avpriv_request_sample(avctx, "bitmap feature");
154 154
         return AVERROR_PATCHWELCOME;
155 155
     }
156 156
 
... ...
@@ -342,7 +342,7 @@ static int paf_vid_decode(AVCodecContext *avctx, void *data,
342 342
         }
343 343
         break;
344 344
     default:
345
-        av_log_ask_for_sample(avctx, "unknown/invalid code\n");
345
+        avpriv_request_sample(avctx, "unknown/invalid code");
346 346
         return AVERROR_INVALIDDATA;
347 347
     }
348 348
 
... ...
@@ -646,7 +646,7 @@ static void fill_coding_method_array (sb_int8_array tone_level_idx, sb_int8_arra
646 646
 
647 647
     if (!superblocktype_2_3) {
648 648
         /* This case is untested, no samples available */
649
-        av_log_ask_for_sample(NULL, "!superblocktype_2_3");
649
+        avpriv_request_sample(NULL, "!superblocktype_2_3");
650 650
         return;
651 651
         for (ch = 0; ch < nb_channels; ch++)
652 652
             for (sb = 0; sb < 30; sb++) {
... ...
@@ -68,7 +68,7 @@ static av_cold int ra288_decode_init(AVCodecContext *avctx)
68 68
     avctx->sample_fmt     = AV_SAMPLE_FMT_FLT;
69 69
 
70 70
     if (avctx->block_align <= 0) {
71
-        av_log_ask_for_sample(avctx, "unsupported block align\n");
71
+        av_log(avctx, AV_LOG_ERROR, "unsupported block align\n");
72 72
         return AVERROR_PATCHWELCOME;
73 73
     }
74 74
 
... ...
@@ -760,7 +760,7 @@ static int process_frame_obj(SANMVideoContext *ctx)
760 760
         return old_codec47(ctx, top, left, w, h);
761 761
         break;
762 762
     default:
763
-        av_log_ask_for_sample(ctx->avctx, "unknown subcodec %d\n", codec);
763
+        avpriv_request_sample(ctx->avctx, "unknown subcodec %d", codec);
764 764
         return AVERROR_PATCHWELCOME;
765 765
     }
766 766
 }
... ...
@@ -784,7 +784,7 @@ static int decode_0(SANMVideoContext *ctx)
784 784
 
785 785
 static int decode_nop(SANMVideoContext *ctx)
786 786
 {
787
-    av_log_ask_for_sample(ctx->avctx, "unknown/unsupported compression type\n");
787
+    avpriv_request_sample(ctx->avctx, "unknown/unsupported compression type");
788 788
     return AVERROR_PATCHWELCOME;
789 789
 }
790 790
 
... ...
@@ -1271,7 +1271,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
1271 1271
                 return ret;
1272 1272
             }
1273 1273
         } else {
1274
-            av_log_ask_for_sample(avctx, "subcodec %d is not implemented\n",
1274
+            avpriv_request_sample(avctx, "subcodec %d",
1275 1275
                    header.codec);
1276 1276
             return AVERROR_PATCHWELCOME;
1277 1277
         }
... ...
@@ -101,7 +101,7 @@ static int decode_sgirle8(AVCodecContext *avctx, uint8_t *dst, const uint8_t *sr
101 101
                 v   -= length;
102 102
             } while (v > 0);
103 103
         } else {
104
-            av_log_ask_for_sample(avctx, "unknown opcode\n");
104
+            avpriv_request_sample(avctx, "opcode %d", v);
105 105
             return AVERROR_PATCHWELCOME;
106 106
         }
107 107
     }
... ...
@@ -5287,7 +5287,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
5287 5287
             v->output_height > 1 << 14) return -1;
5288 5288
 
5289 5289
         if ((v->sprite_width&1) || (v->sprite_height&1)) {
5290
-            av_log_ask_for_sample(avctx, "odd sprites are not supported\n");
5290
+            avpriv_request_sample(avctx, "odd sprites support");
5291 5291
             return AVERROR_PATCHWELCOME;
5292 5292
         }
5293 5293
     }
... ...
@@ -38,7 +38,7 @@ static av_cold int vcr1_decode_init(AVCodecContext *avctx)
38 38
     avctx->pix_fmt = AV_PIX_FMT_YUV410P;
39 39
 
40 40
     if (avctx->width % 8 || avctx->height%4) {
41
-        av_log_ask_for_sample(avctx, "odd dimensions are not supported\n");
41
+        avpriv_request_sample(avctx, "odd dimensions support");
42 42
         return AVERROR_PATCHWELCOME;
43 43
     }
44 44
     return 0;
... ...
@@ -50,7 +50,7 @@ static int ast_read_header(AVFormatContext *s)
50 50
 
51 51
     depth = avio_rb16(s->pb);
52 52
     if (depth != 16) {
53
-        av_log_ask_for_sample(s, "unsupported depth %d\n", depth);
53
+        avpriv_request_sample(s, "depth %d", depth);
54 54
         return AVERROR_INVALIDDATA;
55 55
     }
56 56
 
... ...
@@ -51,7 +51,7 @@ static int avr_read_header(AVFormatContext *s)
51 51
     } else if (chan == 0xFFFFu) {
52 52
         st->codec->channels = 2;
53 53
     } else {
54
-        av_log_ask_for_sample(s, "unknown number of channels\n");
54
+        avpriv_request_sample(s, "chan %d", chan);
55 55
         return AVERROR_PATCHWELCOME;
56 56
     }
57 57
 
... ...
@@ -78,7 +78,7 @@ static int avr_read_header(AVFormatContext *s)
78 78
     } else if (sign == 0xFFFFu && bps == 16) {
79 79
         st->codec->codec_id = AV_CODEC_ID_PCM_S16BE;
80 80
     } else {
81
-        av_log_ask_for_sample(s, "unknown bits per sample\n");
81
+        avpriv_request_sample(s, "bits per sample %d", bps);
82 82
         return AVERROR_PATCHWELCOME;
83 83
     }
84 84
 
... ...
@@ -75,7 +75,7 @@ static int read_header(AVFormatContext *s)
75 75
         return AVERROR_INVALIDDATA;
76 76
     }
77 77
     if (bom == 0xFFFE) {
78
-        av_log_ask_for_sample(s, "unsupported byte order\n");
78
+        avpriv_request_sample(s, "little endian byte order");
79 79
         return AVERROR_PATCHWELCOME;
80 80
     }
81 81
 
... ...
@@ -110,7 +110,7 @@ static int read_header(AVFormatContext *s)
110 110
     case 1: codec = AV_CODEC_ID_PCM_S16BE_PLANAR; break;
111 111
     case 2: codec = AV_CODEC_ID_ADPCM_THP;        break;
112 112
     default:
113
-        av_log_ask_for_sample(s, "unsupported codec: %d\n", codec);
113
+        avpriv_request_sample(s, "codec %d", codec);
114 114
         return AVERROR_PATCHWELCOME;
115 115
     }
116 116
 
... ...
@@ -220,8 +220,8 @@ static int read_header(AVFormatContext *s)
220 220
             }
221 221
             avio_skip(s->pb, start - avio_tell(s->pb));
222 222
 
223
-            if (major!=1 || minor)
224
-                av_log_ask_for_sample(s, "Version %d.%d\n", major, minor);
223
+            if (major != 1 || minor)
224
+                avpriv_request_sample(s, "Version %d.%d", major, minor);
225 225
 
226 226
             return 0;
227 227
         default:
... ...
@@ -184,7 +184,7 @@ static int process_audio_header_elements(AVFormatContext *s)
184 184
         case  3: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R3; break;
185 185
         case -1: break;
186 186
         default:
187
-            av_log_ask_for_sample(s, "unsupported stream type; revision=%i\n", revision);
187
+            avpriv_request_sample(s, "stream type; revision=%i", revision);
188 188
             return 0;
189 189
         }
190 190
         switch (revision2) {
... ...
@@ -195,7 +195,7 @@ static int process_audio_header_elements(AVFormatContext *s)
195 195
             case  2: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R1; break;
196 196
             case  3: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R2; break;
197 197
             default:
198
-                av_log_ask_for_sample(s, "unsupported stream type; revision=%i, revision2=%i\n", revision, revision2);
198
+                avpriv_request_sample(s, "stream type; revision=%i, revision2=%i", revision, revision2);
199 199
                 return 0;
200 200
             }
201 201
             break;
... ...
@@ -203,12 +203,12 @@ static int process_audio_header_elements(AVFormatContext *s)
203 203
         case -1: break;
204 204
         default:
205 205
             ea->audio_codec = AV_CODEC_ID_NONE;
206
-            av_log_ask_for_sample(s, "unsupported stream type; revision2=%i\n", revision2);
206
+            avpriv_request_sample(s, "stream type; revision2=%i", revision2);
207 207
             return 0;
208 208
         }
209 209
         break;
210 210
     default:
211
-        av_log_ask_for_sample(s, "unsupported stream type; compression_type=%i\n", compression_type);
211
+        avpriv_request_sample(s, "stream type; compression_type=%i", compression_type);
212 212
         return 0;
213 213
     }
214 214
 
... ...
@@ -244,7 +244,7 @@ static int process_audio_header_eacs(AVFormatContext *s)
244 244
     case 1: ea->audio_codec = AV_CODEC_ID_PCM_MULAW; ea->bytes = 1; break;
245 245
     case 2: ea->audio_codec = AV_CODEC_ID_ADPCM_IMA_EA_EACS; break;
246 246
     default:
247
-        av_log_ask_for_sample(s, "unsupported stream type; audio compression_type=%i\n", compression_type);
247
+        avpriv_request_sample(s, "stream type; audio compression_type=%i", compression_type);
248 248
     }
249 249
 
250 250
     return 1;
... ...
@@ -332,7 +332,7 @@ static int process_ea_header(AVFormatContext *s) {
332 332
         switch (blockid) {
333 333
             case ISNh_TAG:
334 334
                 if (avio_rl32(pb) != EACS_TAG) {
335
-                    av_log_ask_for_sample(s, "unknown 1SNh headerid\n");
335
+                    avpriv_request_sample(s, "unknown 1SNh headerid");
336 336
                     return 0;
337 337
                 }
338 338
                 err = process_audio_header_eacs(s);
... ...
@@ -344,7 +344,7 @@ static int process_ea_header(AVFormatContext *s) {
344 344
                 if (blockid == GSTR_TAG) {
345 345
                     avio_skip(pb, 4);
346 346
                 } else if ((blockid & 0xFFFF)!=PT00_TAG) {
347
-                    av_log_ask_for_sample(s, "unknown SCHl headerid\n");
347
+                    avpriv_request_sample(s, "unknown SCHl headerid");
348 348
                     return 0;
349 349
                 }
350 350
                 err = process_audio_header_elements(s);
... ...
@@ -531,7 +531,7 @@ static int ea_read_packet(AVFormatContext *s,
531 531
                 chunk_size -= 12;
532 532
             }
533 533
             if (partial_packet) {
534
-                av_log_ask_for_sample(s, "video header followed by audio packet not supported.\n");
534
+                avpriv_request_sample(s, "video header followed by audio packet");
535 535
                 av_free_packet(pkt);
536 536
                 partial_packet = 0;
537 537
             }
... ...
@@ -77,7 +77,7 @@ static int epaf_read_header(AVFormatContext *s)
77 77
         st->codec->codec_id = AV_CODEC_ID_PCM_S8;
78 78
         break;
79 79
     case 1:
80
-        av_log_missing_feature(s, "24-bit Paris PCM format", 1);
80
+        avpriv_request_sample(s, "24-bit Paris PCM format");
81 81
     default:
82 82
         return AVERROR_INVALIDDATA;
83 83
     }
... ...
@@ -53,7 +53,7 @@ static int read_header(AVFormatContext *s)
53 53
 {
54 54
     IcoDemuxContext *ico = s->priv_data;
55 55
     AVIOContext *pb = s->pb;
56
-    int i;
56
+    int i, codec;
57 57
 
58 58
     avio_skip(pb, 4);
59 59
     ico->nb_images = avio_rl16(pb);
... ...
@@ -88,7 +88,8 @@ static int read_header(AVFormatContext *s)
88 88
         if (avio_seek(pb, ico->images[i].offset, SEEK_SET) < 0)
89 89
             break;
90 90
 
91
-        switch(avio_rl32(pb)) {
91
+        codec = avio_rl32(pb);
92
+        switch (codec) {
92 93
         case MKTAG(0x89, 'P', 'N', 'G'):
93 94
             st->codec->codec_id = AV_CODEC_ID_PNG;
94 95
             st->codec->width    = 0;
... ...
@@ -106,7 +107,7 @@ static int read_header(AVFormatContext *s)
106 106
                 st->codec->height = tmp / 2;
107 107
             break;
108 108
         default:
109
-            av_log_ask_for_sample(s, "unsupported codec\n");
109
+            avpriv_request_sample(s, "codec %d", codec);
110 110
             return AVERROR_INVALIDDATA;
111 111
         }
112 112
     }
... ...
@@ -298,7 +298,7 @@ static int iff_read_header(AVFormatContext *s)
298 298
             else if (fmt_size == sizeof(deep_abgr) && !memcmp(fmt, deep_abgr, sizeof(deep_abgr)))
299 299
                 st->codec->pix_fmt = AV_PIX_FMT_ABGR;
300 300
             else {
301
-                av_log_ask_for_sample(s, "unsupported color format\n");
301
+                avpriv_request_sample(s, "color format %.16s", fmt);
302 302
                 return AVERROR_PATCHWELCOME;
303 303
             }
304 304
             break;
... ...
@@ -364,7 +364,7 @@ static int iff_read_header(AVFormatContext *s)
364 364
             } else if (iff->maud_bits ==  8 && iff->maud_compression == 3) {
365 365
                 st->codec->codec_id = AV_CODEC_ID_PCM_MULAW;
366 366
             } else {
367
-                av_log_ask_for_sample(s, "unsupported compression %d and bit depth %d\n", iff->maud_compression, iff->maud_bits);
367
+                avpriv_request_sample(s, "compression %d and bit depth %d", iff->maud_compression, iff->maud_bits);
368 368
                 return AVERROR_PATCHWELCOME;
369 369
             }
370 370
 
... ...
@@ -41,7 +41,7 @@ static int lvf_read_header(AVFormatContext *s)
41 41
     if (!nb_streams)
42 42
         return AVERROR_INVALIDDATA;
43 43
     if (nb_streams > 2) {
44
-        av_log_ask_for_sample(s, "too many streams\n");
44
+        avpriv_request_sample(s, "%d streams", nb_streams);
45 45
         return AVERROR_PATCHWELCOME;
46 46
     }
47 47
 
... ...
@@ -87,7 +87,7 @@ static int lvf_read_header(AVFormatContext *s)
87 87
             avio_seek(s->pb, 2048 + 8, SEEK_SET);
88 88
             return 0;
89 89
         default:
90
-            av_log_ask_for_sample(s, "unknown id\n");
90
+            avpriv_request_sample(s, "id %d", id);
91 91
             return AVERROR_PATCHWELCOME;
92 92
         }
93 93
 
... ...
@@ -130,7 +130,7 @@ static int get_packet_header(AVFormatContext *s)
130 130
     version     = bytestream_get_le32(&p);
131 131
     header_size = bytestream_get_le32(&p);
132 132
     if (version > 1)
133
-        av_log_ask_for_sample(s, "Unknown format version %i\n", version);
133
+        avpriv_request_sample(s, "format version %i", version);
134 134
     if (header_size < (version ? 72 : 60) ||
135 135
         header_size > LXF_MAX_PACKET_HEADER_SIZE ||
136 136
         (header_size & 3)) {
... ...
@@ -172,7 +172,7 @@ static int parse_video_var(AVFormatContext *avctx, AVStream *st, const char *nam
172 172
         } else if (!strcmp(str, "MVC2")) {
173 173
             st->codec->codec_id = AV_CODEC_ID_MVC2;
174 174
         } else {
175
-            av_log_ask_for_sample(avctx, "unknown video compression %s\n", str);
175
+            avpriv_request_sample(avctx, "video compression %s", str);
176 176
         }
177 177
         av_free(str);
178 178
     } else if (!strcmp(name, "FPS")) {
... ...
@@ -214,7 +214,7 @@ static void read_table(AVFormatContext *avctx, AVStream *st, int (*parse)(AVForm
214 214
         name[sizeof(name) - 1] = 0;
215 215
         size = avio_rb32(pb);
216 216
         if (parse(avctx, st, name, size) < 0) {
217
-            av_log_ask_for_sample(avctx, "unknown variable %s\n", name);
217
+            avpriv_request_sample(avctx, "variable %s", name);
218 218
             avio_skip(pb, size);
219 219
         }
220 220
     }
... ...
@@ -274,7 +274,7 @@ static int mv_read_header(AVFormatContext *avctx)
274 274
             vst->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
275 275
             break;
276 276
         default:
277
-            av_log_ask_for_sample(avctx, "unknown video compression %i\n", v);
277
+            avpriv_request_sample(avctx, "video compression %i", v);
278 278
             break;
279 279
         }
280 280
         vst->codec->codec_tag = 0;
... ...
@@ -293,7 +293,7 @@ static int mv_read_header(AVFormatContext *avctx)
293 293
         if (v == AUDIO_FORMAT_SIGNED) {
294 294
             ast->codec->codec_id = AV_CODEC_ID_PCM_S16BE;
295 295
         } else {
296
-            av_log_ask_for_sample(avctx, "unknown audio compression (format %i)\n", v);
296
+            avpriv_request_sample(avctx, "audio compression (format %i)", v);
297 297
         }
298 298
 
299 299
         avio_skip(pb, 12);
... ...
@@ -317,7 +317,7 @@ static int mv_read_header(AVFormatContext *avctx)
317 317
         read_table(avctx, NULL, parse_global_var);
318 318
 
319 319
         if (mv->nb_audio_tracks > 1) {
320
-            av_log_ask_for_sample(avctx, "multiple audio streams\n");
320
+            avpriv_request_sample(avctx, "multiple audio streams support");
321 321
             return AVERROR_PATCHWELCOME;
322 322
         } else if (mv->nb_audio_tracks) {
323 323
             ast = avformat_new_stream(avctx, NULL);
... ...
@@ -329,7 +329,7 @@ static int mv_read_header(AVFormatContext *avctx)
329 329
             if (ast->codec->codec_tag == 100 && ast->codec->codec_id == AUDIO_FORMAT_SIGNED && ast->codec->bits_per_coded_sample == 16) {
330 330
                 ast->codec->codec_id = AV_CODEC_ID_PCM_S16BE;
331 331
             } else {
332
-                av_log_ask_for_sample(avctx, "unknown audio compression %i (format %i, width %i)\n",
332
+                avpriv_request_sample(avctx, "audio compression %i (format %i, width %i)",
333 333
                     ast->codec->codec_tag, ast->codec->codec_id, ast->codec->bits_per_coded_sample);
334 334
                 ast->codec->codec_id = AV_CODEC_ID_NONE;
335 335
             }
... ...
@@ -341,7 +341,7 @@ static int mv_read_header(AVFormatContext *avctx)
341 341
         }
342 342
 
343 343
         if (mv->nb_video_tracks > 1) {
344
-            av_log_ask_for_sample(avctx, "multiple video streams\n");
344
+            avpriv_request_sample(avctx, "multiple video streams support");
345 345
             return AVERROR_PATCHWELCOME;
346 346
         } else if (mv->nb_video_tracks) {
347 347
             vst = avformat_new_stream(avctx, NULL);
... ...
@@ -357,7 +357,7 @@ static int mv_read_header(AVFormatContext *avctx)
357 357
         if (mv->nb_video_tracks)
358 358
             read_index(pb, vst);
359 359
     } else {
360
-        av_log_ask_for_sample(avctx, "unknown version %i\n", version);
360
+        avpriv_request_sample(avctx, "version %i", version);
361 361
         return AVERROR_PATCHWELCOME;
362 362
     }
363 363
 
... ...
@@ -70,7 +70,7 @@ static int nist_read_header(AVFormatContext *s)
70 70
                        !av_strcasecmp(coding, "mu-law")) {
71 71
                 st->codec->codec_id = AV_CODEC_ID_PCM_MULAW;
72 72
             } else {
73
-                av_log_ask_for_sample(s, "unsupported coding: %s\n", coding);
73
+                avpriv_request_sample(s, "coding %s", coding);
74 74
             }
75 75
 
76 76
             avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
... ...
@@ -93,7 +93,7 @@ static int nist_read_header(AVFormatContext *s)
93 93
             } else if (!av_strcasecmp(format, "10")) {
94 94
                 be = 1;
95 95
             } else if (av_strcasecmp(format, "1")) {
96
-                av_log_ask_for_sample(s, "unsupported sample byte format: %s\n", format);
96
+                avpriv_request_sample(s, "sample byte format %s", format);
97 97
                 return AVERROR_PATCHWELCOME;
98 98
             }
99 99
         } else if (!memcmp(buffer, "sample_coding", 13)) {
... ...
@@ -195,7 +195,7 @@ static int ogg_replace_stream(AVFormatContext *s, uint32_t serial, int nsegs)
195 195
         if (i >= ogg->nstreams)
196 196
             return ogg_new_stream(s, serial);
197 197
     } else if (ogg->nstreams != 1) {
198
-        av_log_missing_feature(s, "Changing stream parameters in multistream ogg", 0);
198
+        avpriv_report_missing_feature(s, "Changing stream parameters in multistream ogg");
199 199
         return AVERROR_PATCHWELCOME;
200 200
     }
201 201
 
... ...
@@ -139,7 +139,7 @@ static int pmp_packet(AVFormatContext *s, AVPacket *pkt)
139 139
         int num_packets;
140 140
         pmp->audio_packets = avio_r8(pb);
141 141
         if (!pmp->audio_packets) {
142
-            av_log_ask_for_sample(s, "0 audio packets\n");
142
+            avpriv_request_sample(s, "0 audio packets");
143 143
             return AVERROR_PATCHWELCOME;
144 144
         }
145 145
         num_packets = (pmp->num_streams - 1) * pmp->audio_packets + 1;
... ...
@@ -45,7 +45,7 @@ static int write_header(AVFormatContext *s)
45 45
         return AVERROR(EINVAL);
46 46
     }
47 47
     if (codec->extradata_size > 0) {
48
-        av_log_missing_feature(s, "remuxing from matroska container", 0);
48
+        avpriv_report_missing_feature(s, "remuxing from matroska container");
49 49
         return AVERROR_PATCHWELCOME;
50 50
     }
51 51
     avpriv_set_pts_info(s->streams[0], 64, 1, codec->sample_rate);