return error when dv audio extraction fails
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Mon, 11 Feb 2008 22:37:44 +0000 (22:37 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Mon, 11 Feb 2008 22:37:44 +0000 (22:37 +0000)
Originally committed as revision 11913 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/mov.c

index a0555d3..c1d5e7c 100644 (file)
@@ -1553,7 +1553,9 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
     if (mov->dv_demux && sc->dv_audio_container) {
         dv_produce_packet(mov->dv_demux, pkt, pkt->data, pkt->size);
         av_free(pkt->data);
-        dv_get_packet(mov->dv_demux, pkt);
+        pkt->size = 0;
+        if (dv_get_packet(mov->dv_demux, pkt) < 0)
+            return -1;
     }
 #endif
     pkt->stream_index = sc->ffindex;