diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-03-17 01:25:01 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-03-17 01:25:01 +0000 |
commit | f3356e9c9eb8dc62925aaecf2ceec84106e06c6e (patch) | |
tree | bdadaff376c4d694349c32c1b347d5e30d83fb3d /libavformat/asf.c | |
parent | cc973ecbe77ee6c273e2372ad24bb3aff0be5440 (diff) | |
download | ffmpeg-f3356e9c9eb8dc62925aaecf2ceec84106e06c6e.tar.gz |
more fine grained discarding of packets
Originally committed as revision 4051 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asf.c')
-rw-r--r-- | libavformat/asf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/asf.c b/libavformat/asf.c index d90e46b943..25bed2f450 100644 --- a/libavformat/asf.c +++ b/libavformat/asf.c @@ -545,7 +545,10 @@ 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 || s->streams[asf->stream_index]->discard) { + if (asf->stream_index < 0 + || s->streams[asf->stream_index]->discard >= AVDISCARD_ALL + || (!asf->packet_key_frame && s->streams[asf->stream_index]->discard >= AVDISCARD_NONKEY) + ) { asf->packet_time_start = 0; /* unhandled packet (should not happen) */ url_fskip(pb, asf->packet_frag_size); |