[FFmpeg-devel] [PATCH] Two problems with MPEG2 decoder

Michael Niedermayer michaelni at gmx.at
Fri Mar 1 15:52:03 CET 2013


On Fri, Mar 01, 2013 at 02:22:44PM +0000, Joseph Artsimovich wrote:
> On 26/02/13 20:42, Michael Niedermayer wrote:
> > ...
> > you can try: (if it works it could be tried to limit it to the kind
> > of videos that actually need it)
> >
> > diff --git a/libavformat/mov.c b/libavformat/mov.c
> > index 137f79b..4a51581 100644
> > --- a/libavformat/mov.c
> > +++ b/libavformat/mov.c
> > @@ -1562,6 +1562,7 @@ int ff_mov_read_stsd_entries(MOVContext *c,
> AVIOContext *pb, int entries)
> >           st->need_parsing = AVSTREAM_PARSE_FULL;
> >           break;
> >       case AV_CODEC_ID_MPEG1VIDEO:
> > +    case AV_CODEC_ID_MPEG2VIDEO:
> >           st->need_parsing = AVSTREAM_PARSE_FULL;
> >           break;
> >       case AV_CODEC_ID_VC1:
> 
> That didn't help.
> 
> However, my case turned out to be an easy one to handle. The stream
> in question does have picture coding extensions that correctly
> indicate picture_structure == FRAME_PICT for problematic frames.
> Knowing that, it's easy to discard any extra picture headers that
> may follow the frame picture.
> 
> The patch is attached and it does pass FATE.
> 
> 
> Joseph Artsimovich
> Senior C++ Applications Developer
> MirriAd Ltd

>  mpeg12.c |    9 +++++++++
>  1 file changed, 9 insertions(+)
> f7795b02f2673ed93d6c81a9164d45a99da90e1d  0001-Handle-an-invalid-extra-mpeg2-picture-header-followi.patch
> From 2ac1929e324c0f47f692c8f7bf3eb5aceaf04d23 Mon Sep 17 00:00:00 2001
> From: Joseph Artsimovich <joseph at mirriad.com>
> Date: Fri, 1 Mar 2013 13:37:28 +0000
> Subject: [PATCH] Handle an invalid extra mpeg2 picture header following a
>  frame-encoded picture.

applied

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- 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/20130301/fb6a148b/attachment.asc>


More information about the ffmpeg-devel mailing list