]> git.sesse.net Git - ffmpeg/blobdiff - tools/ismindex.c
Merge commit 'f099d3d1d5466bd63f4ab36270d169ff9ea613b8'
[ffmpeg] / tools / ismindex.c
index ad1f3a848cb968e48f605d6fb3e088eb3ff69734..502a7dc2b1de9b25e9cdfde9f4df4620d0795d3a 100644 (file)
@@ -20,7 +20,7 @@
 
 /*
  * To create a simple file for smooth streaming:
- * avconv <normal input/transcoding options> -movflags frag_keyframe foo.ismv
+ * ffmpeg <normal input/transcoding options> -movflags frag_keyframe foo.ismv
  * ismindex -n foo foo.ismv
  * This step creates foo.ism and foo.ismc that is required by IIS for
  * serving it.
@@ -40,6 +40,8 @@
 #define mkdir(a, b) _mkdir(a)
 #endif
 
+#include "cmdutils.h"
+
 #include "libavformat/avformat.h"
 #include "libavutil/intreadwrite.h"
 #include "libavutil/mathematics.h"
@@ -251,7 +253,10 @@ static int get_video_private_data(struct Track *track, AVCodecContext *codec)
     if (codec->codec_id == AV_CODEC_ID_VC1)
         return get_private_data(track, codec);
 
-    avio_open_dyn_buf(&io);
+    if (avio_open_dyn_buf(&io) < 0)  {
+        err = AVERROR(ENOMEM);
+        goto fail;
+    }
     if (codec->extradata_size < 11 || codec->extradata[0] != 1)
         goto fail;
     sps_size = AV_RB16(&codec->extradata[6]);