[FFmpeg-devel] [PATCH] skip ##ix chunks reading as video/audio data
Michael Niedermayer
michaelni
Tue Nov 25 01:16:52 CET 2008
On Mon, Nov 24, 2008 at 10:04:56AM +0200, Maksym Veremeyenko wrote:
> Michael Niedermayer ???????(??):
> [...]
>>> I am not the author of original code, perhaps, am i missed something?
>> Yes, its something with error recovery, hint: if your check accepts
>> any random chunk the demuxer fails fatally once it becomes desyced
>>> What is preferable way to stop reading index block as frame data?
>> add a check for them, dont hack a random unrelated check to by luck
>> also trigger for them
> I moved ##ix checking in stand-alone block, it check stream id (n)
> requested by call n= get_stream_idx(d); some rows above.
>
> patch attached.
>
> --
> ________________________________________
> Maksym Veremeyenko
> Index: libavformat/avidec.c
> ===================================================================
> --- libavformat/avidec.c (revision 15899)
> +++ libavformat/avidec.c (working copy)
> @@ -787,6 +787,13 @@
> if(!((i-avi->last_pkt_pos)&1) && get_stream_idx(d+1) < s->nb_streams)
> continue;
>
> + //detect ##ix chunk and skip
> + if(d[2] == 'i' && d[3] == 'x' && n < s->nb_streams){
> + url_fskip(pb, size);
> +//av_log(NULL, AV_LOG_ERROR, "SKIPPED [%X %X i x]\n", d[0], d[1]);
id prefer the code without such out commented debuging stuff
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- 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/20081125/8729fe29/attachment.pgp>
More information about the ffmpeg-devel
mailing list