[FFmpeg-devel] [PATCH] H.264: fix decoding of plain still images (broken since revision 14289)
Michael Niedermayer
michaelni
Wed Jan 7 00:09:13 CET 2009
On Mon, Jan 05, 2009 at 11:35:03PM +0100, Reimar D?ffinger wrote:
> On Mon, Jan 05, 2009 at 11:15:22PM +0100, Reinhard Nissl wrote:
> > Some thoughts about the change: actually, it pulls just one
> > picture from delayed_pics when a sequence end has been detected.
So does your patch solve the problem at all?
i mean with a stream that has a few delayed pics like one with b pyramid
a following still image and a single sequence end code would not
cause the still image to be returned
and actually, does it even work with normal IPB video + still image?
> > One could go on and implement that for consecutive calls no bytes
> > are consumed until all delayed_pics have been drained. This is
this will likely not work
> > similar to calling decode with a zero sized buffer, but works in
> > the case where for example two or more sequences have simply been
> > catted together but separated by a sequence end code. Finally,
> > idr() should be called too to initialize the decoder into a state
> > where a next sequence which doesn't start with an idr can be
> > properly decoded.
>
> 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;
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- 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/4b0ff0df/attachment.pgp>
More information about the ffmpeg-devel
mailing list