aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-24 17:33:15 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-25 00:45:17 +0200
commite2fd18d40d998b84af49079aa4cbd9fe9aeb4d88 (patch)
tree2286b3a6a0944b79c621a4c1071beb219a9676b4 /libavformat
parent6b38101df5b2be231d67807e0f520c7d37292cea (diff)
downloadffmpeg-e2fd18d40d998b84af49079aa4cbd9fe9aeb4d88.tar.gz
lavf: factor AVStream st out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index e348fbde5a..4dde821bcf 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1383,6 +1383,7 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt)
const int genpts = s->flags & AVFMT_FLAG_GENPTS;
int eof = 0;
int ret;
+ AVStream *st;
if (!genpts) {
ret = s->packet_buffer ? read_from_packet_buffer(&s->packet_buffer,
@@ -1452,11 +1453,12 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt)
return_packet:
- if(s->streams[pkt->stream_index]->skip_samples) {
+ st = s->streams[pkt->stream_index];
+ if (st->skip_samples) {
uint8_t *p = av_packet_new_side_data(pkt, AV_PKT_DATA_SKIP_SAMPLES, 10);
- AV_WL32(p, s->streams[pkt->stream_index]->skip_samples);
- av_log(s, AV_LOG_DEBUG, "demuxer injecting skip %d\n", s->streams[pkt->stream_index]->skip_samples);
- s->streams[pkt->stream_index]->skip_samples = 0;
+ AV_WL32(p, st->skip_samples);
+ av_log(s, AV_LOG_DEBUG, "demuxer injecting skip %d\n", st->skip_samples);
+ st->skip_samples = 0;
}
if (is_relative(pkt->dts))