[Ffmpeg-devel] Re: Bethsoft VID demuxer and decoder
Michael Niedermayer
michaelni
Sat Apr 7 17:26:02 CEST 2007
Hi
On Sat, Apr 07, 2007 at 07:23:13AM -0700, Nicholas T wrote:
[...]
> >> vid->frame.data[0] = NULL;
> >this was wrong
> I think other codecs had it to ensure that the codec close function
> wouldn't try to free a buffer with no data in it. Just out of
> curiosity, why is this wrong? because frame data is not initialized
> yet, or it is just unneeded
it either does nothing or hides a bug
>
> >clicking on the window is supposed to seek not pause
> okay, so, what do I do, or should I ignore this...bethsoftvid
> obviously isn't the greatest format for seeking, as the block sizes
> aren't known...
i dont think seeking is trivially possible in this format so just
forget seeking
[...]
> >and its of course not possible that the end could have been reached
> >if remaining>0 your checks are much more complex than needed
> >one thing which you should check though is that the initial pointer
> >before the loop is entered is valid (VIDEO_OFFSET_DIFFERENCE_FRAME_BLOCK
> >frame can move that to pretty much arbitrary positions)
> Okay, I did this in a pretty simple way, hopefully it's valid.
> case VIDEO_YOFFSET_DIFFERENCE_FRAME_BLOCK:
> yoffset = bytestream_get_le16(&buf);
> if(yoffset > avctx->height) { return -1; }
should be >=
> destination += vid->frame.linesize[0] * yoffset;
>
> >i know that, my question was if such 0 index actually occurs
> >from a hex dump it appears it does.
>
> >wrong, these are not initalized before (re)get_buffer()
> sorry. I can assume linesize doesn't change though, right?
well other codecs assume that too so its ok ...
ill review the patch in a moment ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070407/53aab14a/attachment.pgp>
More information about the ffmpeg-devel
mailing list