diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index cc740b5a81..37d0fae796 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -2625,7 +2625,7 @@ static int mxf_read_packet_old(AVFormatContext *s, AVPacket *pkt) pkt->stream_index = index; pkt->pos = klv.offset; - codec = s->streams[index]->codec; + codec = st->codec; if (codec->codec_type == AVMEDIA_TYPE_VIDEO && next_ofs >= 0) { /* mxf->current_edit_unit good - see if we have an