[FFmpeg-devel] [PATCH] H.264: fix decoding of plain still images (broken since revision 14289)

Michael Niedermayer michaelni
Wed Jan 7 16:06:12 CET 2009


On Wed, Jan 07, 2009 at 10:54:28AM +0100, Reimar D?ffinger wrote:
> On Wed, Jan 07, 2009 at 12:09:13AM +0100, Michael Niedermayer wrote:
> > On Mon, Jan 05, 2009 at 11:35:03PM +0100, Reimar D?ffinger wrote:
> > > If this change is considered correct/acceptable, at least MPEG-2 should
> > > be changed in the same way.
> > 
> > mpeg2 currently does:
> >     if (buf_size == 0 || (buf_size == 4 && AV_RB32(buf) == SEQ_END_CODE)) {
> >         /* special case for last picture */
> >         if (s2->low_delay==0 && s2->next_picture_ptr) {
> >             *picture= *(AVFrame*)s2->next_picture_ptr;
> >             s2->next_picture_ptr= NULL;
> > 
> >             *data_size = sizeof(AVFrame);
> >         }
> >         return buf_size;
> 
> I know, but SEQ_END_CODE at the end of a frame is not treated specially,

yes


> and if I understand right it is not even split into a separate frame by
> AVParser.

the parser does split it, mplayer isnt using the parser IIRC


> While I'd consider that behaviour correct, it means a calling
> application must have "extra" decode calls or single-I-frame videos will
> not result in any decoded frames at all. If this is changed for H.264 it
> should be changed to MPEG-2, too.

single I frame videos will result in decoded frames if the player correctly
feeds NULL at the end. Thats is and was the case.
And handling seq end at the end of a frame like the patch does is i suspect
not fixing still images within videos (iam still waiting for a confirmation
about this)

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

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090107/39fd266f/attachment.pgp>



More information about the ffmpeg-devel mailing list