Browse code

do not use av_parser_change for h264 which uses bitstream filter, fix #1027

Originally committed as revision 19196 to svn://svn.ffmpeg.org/ffmpeg/trunk

Baptiste Coudurier authored on 2009/06/15 08:55:25
Showing 1 changed files
... ...
@@ -1407,8 +1407,13 @@ static int output_packet(AVInputStream *ist, int ist_index,
1407 1407
                         opkt.flags= pkt->flags;
1408 1408
 
1409 1409
                         //FIXME remove the following 2 lines they shall be replaced by the bitstream filters
1410
+                        if(ost->st->codec->codec_id != CODEC_ID_H264) {
1410 1411
                         if(av_parser_change(ist->st->parser, ost->st->codec, &opkt.data, &opkt.size, data_buf, data_size, pkt->flags & PKT_FLAG_KEY))
1411 1412
                             opkt.destruct= av_destruct_packet;
1413
+                        } else {
1414
+                            opkt.data = data_buf;
1415
+                            opkt.size = data_size;
1416
+                        }
1412 1417
 
1413 1418
                         write_frame(os, &opkt, ost->st->codec, bitstream_filters[ost->file_index][opkt.stream_index]);
1414 1419
                         ost->st->codec->frame_number++;