[FFmpeg-devel] [PATCH] mpegvideo_parser: Fix SEQ_END handling.
Michael Niedermayer
michaelni at gmx.at
Sun Jan 22 15:23:07 CET 2012
This restores the seq end handling so that seq ends are considered
seperate frames and cause the last frame to be flushed.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
libavcodec/mpeg12.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index d34b54d..dd02f36 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -2215,11 +2215,6 @@ int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size,
i++;
pc->frame_start_found = 4;
}
- if (state == SEQ_END_CODE) {
- pc->frame_start_found = 0;
- pc->state=-1;
- return i+1;
- }
if (pc->frame_start_found == 2 && state == SEQ_START_CODE)
pc->frame_start_found = 0;
if (pc->frame_start_found < 4 && state == EXT_START_CODE)
@@ -2231,6 +2226,11 @@ int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size,
return i - 3;
}
}
+ if (state == SEQ_END_CODE) {
+ pc->frame_start_found = 0;
+ pc->state=-1;
+ return i+1;
+ }
if (pc->frame_start_found == 0 && s && state == PICTURE_START_CODE) {
ff_fetch_timestamp(s, i - 3, 1);
}
--
1.7.5.4
More information about the ffmpeg-devel
mailing list