[FFmpeg-devel] [FWD] [PATCH] immediate decoding of dvd stills

Michael Niedermayer michaelni at gmx.at
Fri Jun 24 04:54:40 CEST 2011


On Tue, Jun 21, 2011 at 07:18:22PM +0000, Joakim Plate wrote:
> 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

do you know which commit changed that?


> so a patch like this is
> also required:

this doesnt look correct, i suspect it will loose a picture


> 
> 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?

id like to understand better why we have a regression here.
If i understand you correctly you say this worked before

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110624/ffc1ed11/attachment.asc>


More information about the ffmpeg-devel mailing list