On Wed, Jan 6, 2010 at 3:39 PM, Benoit Fouet <benoit.fouet at free.fr> wrote:
On Wed, 6 Jan 2010 06:46:08 +0100 Michael Niedermayer wrote:
On Tue, Jan 05, 2010 at 11:03:29PM +0530, Mohamed Naufal wrote:
2010/1/5 Michael Niedermayer <michaelni at gmx.at>
[...]
+static int yop_read_packet(AVFormatContext *s, AVPacket *pkt) +{ + ? ?YopDecContext *yop = s->priv_data; + ? ?ByteIOContext *pb ?= s->pb; + + ? ?int ret; + ? ?int palette_size ? ? ? ? ? = 4 + yop->num_pal_colors * 3;
+ ? ?int actual_video_data_size = yop->frame_size - + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? yop->audio_block_length - palette_size;
this still can end up negative, there still are missing checks in the header parsing
Fixed.
[...]
Naufal
?Changelog ? ? ? ? ? ? ? ?| ? ?1 ?doc/general.texi ? ? ? ? | ? ?1 ?libavformat/Makefile ? ? | ? ?1 ?libavformat/allformats.c | ? ?1 ?libavformat/avformat.h ? | ? ?2 ?libavformat/yop.c ? ? ? ?| ?186 +++++++++++++++++++++++++++++++++++++++++++++++ ?6 files changed, 191 insertions(+), 1 deletion(-) 05b7713388599f9ce9d51388deb0b792ae89051f ?yop_demux.patch
patch ok if it works (also seeking and no crashes with damaged files)
[...]
libavformat/yop.c: In function ?yop_read_header?: libavformat/yop.c:80: error: ?CODEC_ID_YOP? undeclared (first use in this function) libavformat/yop.c:80: error: (Each undeclared identifier is reported only once libavformat/yop.c:80: error: for each function it appears in.) libavformat/yop.c: In function ?yop_read_packet?: libavformat/yop.c:126: warning: ?av_destruct_packet_nofree? is deprecated (declared at ./libavcodec/avcodec.h:2794)
Now that the demuxer is approved, Naufal should go ahead and submit the decoder. Also for game formats etc, i think its better if playback support is added as one single commit. -- Jai Menon