#include "libavutil/bswap.h"
#include "libavutil/common.h"
#include "libavutil/avstring.h"
+#include "libavutil/dict.h"
#include "libavcodec/mpegaudio.h"
#include "avformat.h"
#include "avio_internal.h"
av_log(s, AV_LOG_DEBUG, "Unsupported value type %d in tag %s.\n", type, key);
goto finish;
}
- av_metadata_set2(&s->metadata, key, value, 0);
+ if (*value)
+ av_dict_set(&s->metadata, key, value, 0);
finish:
av_freep(&value);
avio_seek(s->pb, off + len, SEEK_SET);
ff_asf_guid g;
enum AVMediaType type;
int type_specific_size, sizeX;
- uint64_t total_size av_unused;
unsigned int tag1;
int64_t pos1, pos2, start_time;
int test_for_ext_stream_audio, is_dvr_ms_audio=0;
return -1;
}
ff_get_guid(pb, &g);
- total_size = avio_rl64(pb);
+ avio_skip(pb, 8); /* total_size */
type_specific_size = avio_rl32(pb);
avio_rl32(pb);
st->id = avio_rl16(pb) & 0x7f; /* stream id */
AVIOContext *pb = s->pb;
ff_asf_guid g;
int ext_len, payload_ext_ct, stream_ct, i;
- uint32_t ext_d av_unused, leak_rate, stream_num;
+ uint32_t leak_rate, stream_num;
unsigned int stream_languageid_index;
avio_rl64(pb); // starttime
for (i=0; i<payload_ext_ct; i++){
ff_get_guid(pb, &g);
- ext_d=avio_rl16(pb);
+ avio_skip(pb, 2);
ext_len=avio_rl32(pb);
avio_skip(pb, ext_len);
}
{
AVIOContext *pb = s->pb;
ASFContext *asf = s->priv_data;
- int n, stream_num, name_len, value_len, value_type av_unused, value_num;
+ int n, stream_num, name_len, value_len, value_num;
int ret, i;
n = avio_rl16(pb);
avio_rl16(pb); //lang_list_index
stream_num= avio_rl16(pb);
name_len= avio_rl16(pb);
- value_type= avio_rl16(pb);
+ avio_skip(pb, 2); /* value_type */
value_len= avio_rl32(pb);
if ((ret = avio_get_str16le(pb, name_len, name, sizeof(name))) < name_len)
// if so the next iteration will pick it up
continue;
} else if (!ff_guidcmp(&g, &ff_asf_head1_guid)) {
- av_unused int v1, v2;
ff_get_guid(pb, &g);
- v1 = avio_rl32(pb);
- v2 = avio_rl16(pb);
+ avio_skip(pb, 6);
continue;
} else if (!ff_guidcmp(&g, &ff_asf_marker_header)) {
asf_read_marker(s, gsize);
const char primary_tag[3] = { rfc1766[0], rfc1766[1], '\0' }; // ignore country code if any
const char *iso6392 = av_convert_lang_to(primary_tag, AV_LANG_ISO639_2_BIBL);
if (iso6392)
- av_metadata_set2(&st->metadata, "language", iso6392, 0);
+ av_dict_set(&st->metadata, "language", iso6392, 0);
}
}
}
ASFContext *asf = s->priv_data;
int rsize = 1;
int num = avio_r8(pb);
- int64_t ts0, ts1 av_unused;
+ int64_t ts0;
asf->packet_segments--;
asf->packet_key_frame = num >> 7;
// av_log(s, AV_LOG_DEBUG, "\n");
avio_skip(pb, 10);
ts0= avio_rl64(pb);
- ts1= avio_rl64(pb);
+ avio_skip(pb, 8);;
avio_skip(pb, 12);
avio_rl32(pb);
avio_skip(pb, asf->packet_replic_size - 8 - 38 - 4);