On Sat, Dec 26, 2009 at 02:26:38PM +0530, Mohamed Naufal wrote:
[...]
Please suitably trim your quotes, thank you.
Yadu and I are working together. Thought I'd submit the patch this time. Have fixed the pointed out issues. Waiting for comments.
There are still tabs and trailing whitespace in your code.
--- Changelog (revision 20921) +++ Changelog (working copy) @@ -40,6 +40,7 @@ - Core Audio Format demuxer - Atrac1 decoder - MD STUDIO audio demuxer +- Psygnosis YOP demuxer - RF64 support in WAV demuxer - MPEG-4 Audio Lossless Coding (ALS) decoder - -formats option split into -formats, -codecs, -bsfs, and -protocols
Add the new entry at the end. Is the comment at the top of the file not clear enough?
--- libavformat/yop.c (revision 0) +++ libavformat/yop.c (revision 0) @@ -0,0 +1,175 @@ + +static void yop_free_packets(YopDecContext *yop) { + +static int yop_probe(AVProbeData *probe_packet) +{
inconsistent function declarations; use K&R style (yop_probe)
+ if ((AV_RB16(probe_packet->buf) == AV_RB16("YO")) && + (probe_packet->buf[6] != 0) && (probe_packet->buf[7] != 0) && + !(AV_RL16(probe_packet->buf + 8) & 1) && !(AV_RL16(probe_packet->buf + 10) & 1));
Indentation seems off; also, what's the semicolon doing at the end of the line?
+ video_stream->codec->extradata = + av_mallocz(video_stream->codec->extradata_size + + FF_INPUT_BUFFER_PADDING_SIZE);
ugly indentation
+ yop->num_pal_colors = video_dec->extradata[0]; + yop->sound_chunk_length = AV_RL16(video_dec->extradata + 6);
Align the '='.
+ int palette_size = 4 + yop->num_pal_colors * 3; + int actual_video_data_size = + yop->frame_size - yop->sound_chunk_length - palette_size;
ugly formatting again
+ if (ret < 0) + return ret; + else if (ret < palette_size) {
Add braces around the first if block.
+ if (ret < 0) + return ret; + else if (ret < actual_video_data_size) {
ditto Diego