[FFmpeg-devel] [PATCH] flac: ignore IDv3 tags if vorbis tags exist
Ben Boeckel
mathstuf at gmail.com
Mon Feb 2 02:54:55 CET 2015
On Mon, 02 Feb, 2015 at 01:10:47 GMT, James Almer wrote:
>> + if (has_idv3) {
>> + av_log(s, AV_LOG_WARNING, "FLAC does not support IDv3 tags.\n");
>> + }
>
> You could check for s->error_recognition & AV_EF_COMPLIANT and abort if true instead of just warning.
> And the message could be more verbose, mentioning the file does not follow the spec and such.
Ah, I had missed that. Done.
>> +
>> /* process metadata blocks */
>> while (!avio_feof(s->pb) && !metadata_last) {
>> avio_read(s->pb, header, 4);
>> @@ -141,6 +152,12 @@ static int flac_read_header(AVFormatContext *s)
>> if (metadata_type == FLAC_METADATA_TYPE_VORBIS_COMMENT) {
>> AVDictionaryEntry *chmask;
>>
>> + if (has_idv3) {
>> + av_log(s, AV_LOG_WARNING, "FLAC found with IDv3 and OGG tags; ignoring IDv3 tags.\n");
>
> AV_LOG_VERBOSE is probably better here.
Done. Also replaced OGG -> vorbis.
>> + if (av_dict_count(s->metadata)) {
>> + /* XXX: Is there a better way to parse this out? IDv3 parsing is done
>> + * all the way out in avformat_open_input. */
>> + has_idv3 = 1;
>> + }
If no one has better ideas for this by tomorrow, I'll send an updated
patch then.
Thanks,
--Ben
More information about the ffmpeg-devel
mailing list