[FFmpeg-devel] [PATCH] avformat: Add Dynacolor MVC Demuxer

Carl Eugen Hoyos ceffmpeg at gmail.com
Mon Mar 23 00:02:38 EET 2020


Am So., 22. März 2020 um 18:29 Uhr schrieb Tom Needham <06needhamt at gmail.com>:
>
> This demuxer adds support for demuxing files in the Dynacolor format
> such as the sample located at:
>
> http://samples.ffmpeg.org/camera-dvr/dynacolor/dynacolor-camera-sample
>
> However, some decode errors are showing on the resulting MPEG4 stream.
> I don't know whether this is a bug with the demuxer or the file as there is
> only one sample
> but the output results in a 1 second mp4 file that is playable in VLC media
> player.

I don't know but a demuxer that produces some useful output is better
than no demuxer.

> +static int dyna_read_probe(const AVProbeData *p)
> +{
> +    unsigned char* bytes = av_malloc(p->buf_size);
> +
> +    for (int i = 0; i < p->buf_size; i++) {
> +        bytes[i] = p->buf[i];
> +    }

This is not useful, please look at other probe functions.

> +    if(bytes[0] == 0x40 && bytes[1] == 0x32 && bytes[2] == 0x10 &&
> bytes[3] == 0x20)
> +        return AVPROBE_SCORE_MAX;

This should return MAX/2 for 32 bit.

> +
> +    return 0;
> +}

Your patch has many style issues, please run tools/patcheck
and look at other files.
This includes comments, camel-case variable names and
strange "{" "}" placement.

Carl Eugen


More information about the ffmpeg-devel mailing list