[FFmpeg-devel] [PATCH v5] lavf/flv: Add XV (Xunlei Video) Support. Fixes ticket #3720

Shivam Goyal shivgo at iitk.ac.in
Tue Apr 9 18:15:41 EEST 2019


On 09-04-2019 08:32 PM, Moritz Barsnick wrote:
> Some minor nitpicking remarks from me:
>
>> Subject: [PATCH] lavf/flv: Add XV (Xunlei Video) Support. Fixes ticket #3720.
> Basically, the second sentence belongs into the body of the commit
> message, after a single empty line separator. (It may not matter here.)
>
>>   Changelog                |  1 +
>>   libavformat/Makefile     |  1 +
>>   libavformat/allformats.c |  1 +
>>   libavformat/flvdec.c     | 85 ++++++++++++++++++++++++++++++++++++++++
> You could also add a documentation entry for xv, referring to the flv
> doc. That would be in doc/demuxers.texi. (Can be added later, IMO.)
Would add documentation entry too.
>
>> +    if (d[0] == 'X' &&
>> +        d[1] == 'L' &&
>> +        d[2] == 'V' &&
>> +        d[3] == 'F') {
> Question to the other core developers: Is there any preference for this
> style of code over:
>         if (AV_RL32(d) == MKTAG('X', 'L', 'V', 'F')
> which some other probes use?
> (flv rightly doesn't use the latter style, because d[3] is variable.)
>
>> +        return AVPROBE_SCORE_EXTENSION + 1;
> I believe Carl Eugen asked you to change this to:
> AVPROBE_SCORE_EXTENSION / 2 + 1

Carl Eugen suggested me to change to AVPROBE_SCORE_MAX /2 +1

AVPROBE_SCORE_MAX has a value of 100.

But the AVPROBE_SCORE_EXTENSION already has a value of 50. so, I change 
it to that

>> +    if (!strcmp(s->iformat->name , "xv")) {
>> +        for (i=0; i < FFMIN(2,fileposlen); i++) {
>                  i = 0 (whitespace around all operators)
>> +};
>> \ No newline at end of file
> You should also consider adding a newline at the end of the last line.
>
> If this works (I haven't tested): Nice improvement versus your first
> patch!
Thanks, I will add the new line too.
> Cheers,
> Moritz
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list