Mercurial > libavformat.hg
diff mpeg.c @ 652:b47948262721 libavformat
support discarding uninterresting packets
author | michael |
---|---|
date | Sat, 22 Jan 2005 13:36:02 +0000 |
parents | 8909a59c9461 |
children | b2ee9f2492d7 |
line wrap: on
line diff
--- a/mpeg.c Sat Jan 22 02:30:45 2005 +0000 +++ b/mpeg.c Sat Jan 22 13:36:02 2005 +0000 @@ -1533,6 +1533,8 @@ if (codec_id != CODEC_ID_PCM_S16BE) st->need_parsing = 1; found: + if(st->discard) + goto skip; if (startcode >= 0xa0 && startcode <= 0xbf) { int b1, freq; @@ -1555,8 +1557,8 @@ pkt->dts = dts; pkt->stream_index = st->index; #if 0 - av_log(s, AV_LOG_DEBUG, "%d: pts=%0.3f dts=%0.3f\n", - pkt->stream_index, pkt->pts / 90000.0, pkt->dts / 90000.0); + av_log(s, AV_LOG_DEBUG, "%d: pts=%0.3f dts=%0.3f size=%d\n", + pkt->stream_index, pkt->pts / 90000.0, pkt->dts / 90000.0, pkt->size); #endif return 0;