static int dss_read_metadata_date(AVFormatContext *s, unsigned int offset,

                                  const char *key)

{

    AVIOContext *pb = s->pb;

    char datetime[64], string[DSS_TIME_SIZE + 1] = { 0 };

    int y, month, d, h, minute, sec;

    int ret;



    avio_seek(pb, offset, SEEK_SET);



    ret = avio_read(s->pb, string, DSS_TIME_SIZE);

    if (ret < DSS_TIME_SIZE)

        return ret < 0 ? ret : AVERROR_EOF;



    sscanf(string, "%2d%2d%2d%2d%2d%2d", &y, &month, &d, &h, &minute, &sec);

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

     * and hope it will never be used in the next century. */

    snprintf(datetime, sizeof(datetime), "%.4d-%.2d-%.2dT%.2d:%.2d:%.2d",

             y + 2000, month, d, h, minute, sec);

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

}

static int dss_read_metadata_date(AVFormatContext *s, unsigned int offset,

                                  const char *key)

{

    AVIOContext *pb = s->pb;

    char datetime[64], string[DSS_TIME_SIZE + 1] = { 0 };

    int y, month, d, h, minute, sec;

    int ret;



    avio_seek(pb, offset, SEEK_SET);



    ret = avio_read(s->pb, string, DSS_TIME_SIZE);

    if (ret < DSS_TIME_SIZE)

        return ret < 0 ? ret : AVERROR_EOF;



    sscanf(string, "%2d%2d%2d%2d%2d%2d", &y, &month, &d, &h, &minute, &sec);

    



    snprintf(datetime, sizeof(datetime), "%.4d-%.2d-%.2dT%.2d:%.2d:%.2d",

             y + 2000, month, d, h, minute, sec);

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

}

    sscanf(string, "%2d%2d%2d%2d%2d%2d", &y, &month, &d, &h, &minute, &sec);
static int FUNC_0(AVFormatContext *VAR_0, unsigned int VAR_1,

                                  const char *VAR_2)

{

    AVIOContext *pb = VAR_0->pb;

    char VAR_3[64], string[DSS_TIME_SIZE + 1] = { 0 };

    int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;

    int VAR_10;



    avio_seek(pb, VAR_1, SEEK_SET);



    VAR_10 = avio_read(VAR_0->pb, string, DSS_TIME_SIZE);

    if (VAR_10 < DSS_TIME_SIZE)

        return VAR_10 < 0 ? VAR_10 : AVERROR_EOF;



    sscanf(string, "%2d%2d%2d%2d%2d%2d", &VAR_4, &VAR_5, &VAR_6, &VAR_7, &VAR_8, &VAR_9);

    



    snprintf(VAR_3, sizeof(VAR_3), "%.4d-%.2d-%.2dT%.2d:%.2d:%.2d",

             VAR_4 + 2000, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9);

    return av_dict_set(&VAR_0->metadata, VAR_2, VAR_3, 0);

}

static int FUNC_0(AVFormatContext *VAR_0, unsigned int VAR_1,
const char *VAR_2)
{ AVIOContext *pb = VAR_0->pb; char VAR_3[64], string[DSS_TIME_SIZE + 1] = { 0 }; int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9; int VAR_10; avio_seek(pb, VAR_1, SEEK_SET); VAR_10 = avio_read(VAR_0->pb, string, DSS_TIME_SIZE); if (VAR_10 < DSS_TIME_SIZE)
return VAR_10 < 0 ? VAR_10 : AVERROR_EOF; sscanf(string, "%2d%2d%2d%2d%2d%2d", &VAR_4, &VAR_5, &VAR_6, &VAR_7, &VAR_8, &VAR_9); snprintf(VAR_3, sizeof(VAR_3), "%.4d-%.2d-%.2dT%.2d:%.2d:%.2d",
VAR_4 + 2000, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9); return av_dict_set(&VAR_0->metadata, VAR_2, VAR_3, 0); }