[FFmpeg-devel] [PATCH 1/2] electronicarts: use av_log_ask_for_sample

Peter Ross pross at xvid.org
Sat Nov 10 00:23:00 CET 2012


---
This replaces some other instances of av_log(... unsupported ...) with av_log_ask_for_sample()

 libavformat/electronicarts.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index c5533f2..0847a3a 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -184,7 +184,7 @@ static int process_audio_header_elements(AVFormatContext *s)
         case  3: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R3; break;
         case -1: break;
         default:
-            av_log(s, AV_LOG_ERROR, "unsupported stream type; revision=%i\n", revision);
+            av_log_ask_for_sample(s, "unsupported stream type; revision=%i\n", revision);
             return 0;
         }
         switch (revision2) {
@@ -194,12 +194,12 @@ static int process_audio_header_elements(AVFormatContext *s)
         case -1: break;
         default:
             ea->audio_codec = AV_CODEC_ID_NONE;
-            av_log(s, AV_LOG_ERROR, "unsupported stream type; revision2=%i\n", revision2);
+            av_log_ask_for_sample(s, "unsupported stream type; revision2=%i\n", revision2);
             return 0;
         }
         break;
     default:
-        av_log(s, AV_LOG_ERROR, "unsupported stream type; compression_type=%i\n", compression_type);
+        av_log_ask_for_sample(s, "unsupported stream type; compression_type=%i\n", compression_type);
         return 0;
     }
 
@@ -235,7 +235,7 @@ static int process_audio_header_eacs(AVFormatContext *s)
     case 1: ea->audio_codec = AV_CODEC_ID_PCM_MULAW; ea->bytes = 1; break;
     case 2: ea->audio_codec = AV_CODEC_ID_ADPCM_IMA_EA_EACS; break;
     default:
-        av_log (s, AV_LOG_ERROR, "unsupported stream type; audio compression_type=%i\n", compression_type);
+        av_log_ask_for_sample(s, "unsupported stream type; audio compression_type=%i\n", compression_type);
     }
 
     return 1;
@@ -323,7 +323,7 @@ static int process_ea_header(AVFormatContext *s) {
         switch (blockid) {
             case ISNh_TAG:
                 if (avio_rl32(pb) != EACS_TAG) {
-                    av_log (s, AV_LOG_ERROR, "unknown 1SNh headerid\n");
+                    av_log_ask_for_sample(s, "unknown 1SNh headerid\n");
                     return 0;
                 }
                 err = process_audio_header_eacs(s);
@@ -335,7 +335,7 @@ static int process_ea_header(AVFormatContext *s) {
                 if (blockid == GSTR_TAG) {
                     avio_skip(pb, 4);
                 } else if ((blockid & 0xFFFF)!=PT00_TAG) {
-                    av_log (s, AV_LOG_ERROR, "unknown SCHl headerid\n");
+                    av_log_ask_for_sample(s, "unknown SCHl headerid\n");
                     return 0;
                 }
                 err = process_audio_header_elements(s);
-- 
1.7.10.4

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121110/7a0cc4e2/attachment.asc>


More information about the ffmpeg-devel mailing list