[FFmpeg-devel] [FWD] [PATCH] immediate decoding of dvd stills
Joakim Plate
elupus at ecce.se
Tue Jun 21 21:18:22 CEST 2011
Hi,
Bump on OLD OLD issue. Still no knews on this is there? I would love to replace
libmpeg2 with ffmpeg for dvd video decoding, but this is still a blocker.
At some point since back then, the parser for mpeg video has been changed to
output the sequence end byte as part of the video packet so a patch like this is
also required:
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index bd858a5..3fd68e3 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -2280,7 +2280,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
MpegEncContext *s2 = &s->mpeg_enc_ctx;
av_dlog(avctx, "fill_buffer\n");
- if (buf_size == 0 || (buf_size == 4 && AV_RB32(buf) == SEQ_END_CODE)) {
+ if (buf_size == 0 || (buf_size >= 4 && AV_RB32(buf+buf_size-4) ==
SEQ_END_CODE)) {
/* special case for last picture */
if (s2->low_delay==0 && s2->next_picture_ptr) {
*picture= *(AVFrame*)s2->next_picture_ptr;
Would something like a bug workaround flag be acceptable to get this given that
it's fully know it's a dvd with still frames on codec open?
/Joakim
More information about the ffmpeg-devel
mailing list