Correctly use output format stream index for bitstream filter when doing stream copy.
authorAndreas Öman <andreas@lonelycoder.com>
Wed, 9 Jan 2008 06:22:32 +0000 (06:22 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Wed, 9 Jan 2008 06:22:32 +0000 (06:22 +0000)
Originally committed as revision 11480 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffmpeg.c

index 12db8a8..b69a84d 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1266,7 +1266,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
                         if(av_parser_change(ist->st->parser, ost->st->codec, &opkt.data, &opkt.size, data_buf, data_size, pkt->flags & PKT_FLAG_KEY))
                             opkt.destruct= av_destruct_packet;
 
-                        write_frame(os, &opkt, ost->st->codec, bitstream_filters[ost->file_index][pkt->stream_index]);
+                        write_frame(os, &opkt, ost->st->codec, bitstream_filters[ost->file_index][opkt.stream_index]);
                         ost->st->codec->frame_number++;
                         ost->frame_number++;
                         av_free_packet(&opkt);