aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/asf.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-01-22 13:36:02 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-01-22 13:36:02 +0000
commitb9866ebcc7d9891fb6b07cab70319fe1742a100a (patch)
tree3e74ec233cd2ef881ee097956e7a8ca3e6b215cf /libavformat/asf.c
parente19456e3ee263ae1c46b623c8394394710721ff4 (diff)
downloadffmpeg-b9866ebcc7d9891fb6b07cab70319fe1742a100a.tar.gz
support discarding uninterresting packets
Originally committed as revision 3860 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asf.c')
-rw-r--r--libavformat/asf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/asf.c b/libavformat/asf.c
index 8450b53f94..d90e46b943 100644
--- a/libavformat/asf.c
+++ b/libavformat/asf.c
@@ -545,12 +545,13 @@ static int asf_read_packet(AVFormatContext *s, AVPacket *pkt)
asf->packet_size_left -= rsize;
//printf("___objsize____ %d %d rs:%d\n", asf->packet_obj_size, asf->packet_frag_offset, rsize);
- if (asf->stream_index < 0) {
+ if (asf->stream_index < 0 || s->streams[asf->stream_index]->discard) {
asf->packet_time_start = 0;
/* unhandled packet (should not happen) */
url_fskip(pb, asf->packet_frag_size);
asf->packet_size_left -= asf->packet_frag_size;
- av_log(s, AV_LOG_ERROR, "ff asf skip %d %d\n", asf->packet_frag_size, num & 0x7f);
+ if(asf->stream_index < 0)
+ av_log(s, AV_LOG_ERROR, "ff asf skip %d %d\n", asf->packet_frag_size, num & 0x7f);
continue;
}
asf->asf_st = s->streams[asf->stream_index]->priv_data;