[FFmpeg-devel] [PATCH] wavdec: RIFX file format support

Carl Eugen Hoyos cehoyos at ag.or.at
Wed Dec 17 10:32:48 CET 2014


Thomas Volkert <silvo <at> gmx.net> writes:

>      if (size >= 18) {  /* We're obviously dealing with WAVEFORMATEX */
> -        int cbSize = avio_rl16(pb); /* cbSize */
> +        int cbSize = (!big_endian ? avio_rl16(pb) : 
> avio_rb16(pb)); /* cbSize */

This change looks useless to me given that you error 
out two lines below:

> +        if (big_endian) {
> +            avpriv_report_missing_feature(codec, 
> "WAVEFORMATEX support for RIFX files\n");
> +            return AVERROR_PATCHWELCOME;

> -    /* check RIFF header */
> -    tag = avio_rl32(pb);
> -
> -    rf64 = tag == MKTAG('R', 'F', '6', '4');
> -    if (!rf64 && tag != MKTAG('R', 'I', 'F', 'F'))
> +    /* read chunk ID */
> +    switch (avio_rl32(pb)) {

I still believe this would look simpler like this:
/* check RIFF header */
tag = avio_rl32(pb);

switch (tag) {

Carl Eugen



More information about the ffmpeg-devel mailing list