On Sat, Dec 26, 2009 at 10:29:35PM +0530, Mohamed Naufal wrote:
2009/12/26 Diego Biurrun <diego at biurrun.de>
+ else if (ret < palette_size) {
Merge these two lines.
+ } + else if (ret < actual_video_data_size) {
Sound data comes between palette and video data. I am not sure if I can merge the above lines in a straightforward manner.
It seems I accidentally deleted one line too many from your patch. What I meant to suggest is that you place the "else if" on the same line as the closing brace of the preceding if.
--- libavformat/yop.c (revision 0) +++ libavformat/yop.c (revision 0) @@ -0,0 +1,175 @@ + +static int yop_probe(AVProbeData *probe_packet) +{ + if (AV_RB16(probe_packet->buf) == AV_RB16("YO") && + !(AV_RL16(probe_packet->buf + 8) & 1) && !(AV_RL16(probe_packet->buf + 10) & 1)) + return AVPROBE_SCORE_MAX / 2 + 1;
You no longer check probe_packet->buf[6] and [7]?
+ if (yop->stream == 0) {
if (!yop->stream)
+ if (ret < 0) { + return ret; + } + else if (ret < palette_size) {
See, above, merge the }-line and the else-line.
+ ret = get_buffer(pb, yop->video_packet.data + palette_size, actual_video_data_size);
Break this long line.
+ if (ret < 0) { + return ret; + } + else if (ret < actual_video_data_size) {
ditto No more comments from my side, let's see if Michael has anything else to say. Diego