aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-10 18:14:20 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-03-10 18:14:20 +0100
commit0d82c3a0ca6c5ed1e757a826b966687382f0180e (patch)
tree32714aaad2ac2b838073b264395f968b13b60e12 /libavformat/avidec.c
parentb7a750f67f68b41d5f3215906a5282b9cb7937d3 (diff)
parent979f77b0dc40571761999633a38d97be9a1670c8 (diff)
downloadffmpeg-0d82c3a0ca6c5ed1e757a826b966687382f0180e.tar.gz
Merge commit '979f77b0dc40571761999633a38d97be9a1670c8' into release/0.10
* commit '979f77b0dc40571761999633a38d97be9a1670c8': h264: check that an IDR NAL only contains I slices mov: Free an earlier allocated array if allocating a new one segafilm: fix leaks if reading the header fails h264_cavlc: check the size of the intra PCM data. cavs: Check for negative cbp avi: DV in AVI must be considered single stream avutil: use align == 0 for default alignment in audio sample buffer functions Conflicts: libavcodec/cavsdec.c libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 5a8d5a7741..0b43f09b3e 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -940,7 +940,7 @@ start_sync:
goto start_sync;
}
- n= get_stream_idx(d);
+ n = avi->dv_demux ? 0 : get_stream_idx(d);
if(!((i-avi->last_pkt_pos)&1) && get_stream_idx(d+1) < s->nb_streams)
continue;
@@ -1394,12 +1394,17 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
int64_t pos, pos_min;
AVIStream *ast;
+ /* Does not matter which stream is requested dv in avi has the
+ * stream information in the first video stream.
+ */
+ if (avi->dv_demux)
+ stream_index = 0;
+
if (!avi->index_loaded) {
/* we only load the index on demand */
avi_load_index(s);
avi->index_loaded |= 1;
}
- assert(stream_index>= 0);
st = s->streams[stream_index];
ast= st->priv_data;
@@ -1417,7 +1422,6 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
/* One and only one real stream for DV in AVI, and it has video */
/* offsets. Calling with other stream indexes should have failed */
/* the av_index_search_timestamp call above. */
- assert(stream_index == 0);
if(avio_seek(s->pb, pos, SEEK_SET) < 0)
return -1;