[FFmpeg-devel] [PATCH 2/3] lavc, configure: add avs2 video decoder via libdavs2

Moritz Barsnick barsnick at gmx.net
Mon May 28 15:58:48 EEST 2018


On Mon, May 28, 2018 at 18:14:56 +0800, hwren wrote:
> +        .name      = "avs2",
> +        .long_name = NULL_IF_CONFIG_SMALL("Chinese AVS2 (Audio Video Standar) (AVS2-P2, JiZhun profile)"),
> +        .props     = AV_CODEC_PROP_LOSSY,

So, does "Chinese" belong to the name or description of the codec, or
not?

Furthermore, "Audio Video Standar" is missing a "d" at the end.

> +            if(*got_frame==1) {

Whitespace:    if (*got_frame == 1) {
As far as I understand, you should also omit the curly brackets.

> +            if (len < 0) {
> +                av_log(NULL, AV_LOG_ERROR, "An decoder error counted\n");

"A decoder error occurred."

And why logging with context NULL? That should be avoided, you have
avctx available, right?

> +                    av_log(avctx, AV_LOG_VERBOSE, "[davs2] decoder destroyed. 0x%p; frames %d\n", cad->decoder, cad->decoded_frames);
                                                      ^^
^Here, on the other hand, the context will already report davs2, if I'm
not mistaken.

> +            if(*got_frame==1) {
Whitespace and brackets, see above.

> +    .long_name      = NULL_IF_CONFIG_SMALL("Decoder for Chinese AVS2"),

Chinese?

Moritz


More information about the ffmpeg-devel mailing list