]> git.sesse.net Git - ffmpeg/commitdiff
Make write_streamheader() log a message if there is no codec tag
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Wed, 2 Jun 2010 21:57:40 +0000 (21:57 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Wed, 2 Jun 2010 21:57:40 +0000 (21:57 +0000)
defined.

Originally committed as revision 23434 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/nutenc.c

index 31267d357cf3ee89bdc50fd23e2eba48a10f2a92..061cd870d6f5533a50637c5a562aa5d2aec7e6e5 100644 (file)
@@ -404,8 +404,10 @@ static int write_streamheader(AVFormatContext *avctx, ByteIOContext *bc, AVStrea
     put_v(bc, 4);
     if (codec->codec_tag){
         put_le32(bc, codec->codec_tag);
     put_v(bc, 4);
     if (codec->codec_tag){
         put_le32(bc, codec->codec_tag);
-    }else
+    } else {
+        av_log(avctx, AV_LOG_ERROR, "No codec tag defined for stream %d\n", i);
         return AVERROR(EINVAL);
         return AVERROR(EINVAL);
+    }
 
     put_v(bc, nut->stream[i].time_base - nut->time_base);
     put_v(bc, nut->stream[i].msb_pts_shift);
 
     put_v(bc, nut->stream[i].time_base - nut->time_base);
     put_v(bc, nut->stream[i].msb_pts_shift);