This fixes broken timestamps on streams where the SPS/PPS is at the end of the previous packet, instead of in front of the next packet, observed in badly packetized MPEG-TS streams. --- libavcodec/h264_parser.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 19d1aa3..466008e 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -520,6 +520,9 @@ static int h264_parse(AVCodecParserContext *s, } else { next = h264_find_frame_end(p, buf, buf_size); + if (next == END_NOT_FOUND && pc->frame_start_found == 0) + s->fetch_timestamp = 1; + if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { *poutbuf = NULL; *poutbuf_size = 0; -- 2.5.3.windows.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel