On Wed, Feb 04, 2015 at 09:27:42AM +0100, Oleksij Rempel wrote:
> Signed-off-by: Oleksij Rempel <[email protected]>
> Signed-off-by: Luca Barbato <[email protected]>
> Signed-off-by: Vittorio Giovara <[email protected]>
> ---
>  Changelog                |   2 +-
>  doc/general.texi         |   1 +
>  libavformat/Makefile     |   1 +
>  libavformat/allformats.c |   1 +
>  libavformat/dss.c        | 343 
> +++++++++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 347 insertions(+), 1 deletion(-)
>  create mode 100644 libavformat/dss.c

This needs a version bump in libavformat/version.h.

https://www.libav.org/developer.html#New-codecs-or-formats-checklist

> --- a/doc/general.texi
> +++ b/doc/general.texi
> @@ -221,6 +221,7 @@ library:
>      @tab Used in the game Cyberia from Interplay.
>  @item Delphine Software International CIN @tab   @tab X
>      @tab Multimedia format used by Delphine Software games.
> +@item Digital Speech Standard (dss) @tab   @tab X

DSS

I think the abbreviation should be capitalized.

> --- /dev/null
> +++ b/libavformat/dss.c
> @@ -0,0 +1,343 @@
> +/*
> + * dss demuxer

Same; I'd write the unabbreviated name here, though.

> +static int dss_probe(AVProbeData *p)
> +{
> +    /* Magic is 'DSS' */
> +    if (*p->buf != 0x02 || *(p->buf + 1) != 'D' || *(p->buf + 2) != 'S' ||
> +        *(p->buf + 3) != 'S')

p->buf[0], p->buf[1], etc ?

That's what we use in other places, more readable IMO.

> +    /* We deal with a two-digit year here, so set default date to 2000

the default date

> +    av_dict_set(&s->metadata, key, datetime, 0);

av_dict_set can fail, you need to check the return value.

> +static int dss_read_metadata_string(AVFormatContext *s, unsigned int offset,
> +                                    unsigned int size, const char *key)
> +{
> +    av_dict_set(&s->metadata, key, value, 0);

same

> +static int dss_read_header(AVFormatContext *s)
> +{
> +    DSSDemuxContext *priv = s->priv_data;

We usually just call the context ctx or c or some such ...

> +static void dss_sp_byte_swap(DSSDemuxContext *priv,
> +                             int8_t *dst, const int8_t *src)

A signed pointer type is somewhat odd, is it on purpose?

> +AVInputFormat ff_dss_demuxer = {
> +    .name           = "dss",
> +    .long_name      = NULL_IF_CONFIG_SMALL("DSS"),

Add the full name to .long_name, not just the abbreviation, i.e.
Digital Speech Standard (DSS).

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to