[FFmpeg-devel] [PATCH] ff_put_wav_header: add flag to force WAVEFORMATEX

Tomas Härdin tomas.hardin at codemill.se
Mon Apr 28 10:44:40 CEST 2014


On 2014-04-28 08:49, Daniel Verkamp wrote:
> @@ -189,7 +189,9 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc)
>           avio_wl32(pb, 0xAA000080);
>           avio_wl32(pb, 0x719B3800);
>           }
> -    } else {
> +    } else if ((flags & FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX) ||
> +               enc->codec_tag != 0x0001 /* PCM */ ||
> +               riff_extradata - riff_extradata_start) {
>           avio_wl16(pb, riff_extradata - riff_extradata_start); /* cbSize */
>       }

Can we get a comment that says PCMWAVEFORMAT below this? Something like:

     } else if ((flags & FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX) ||
                enc->codec_tag != 0x0001 /* PCM */ ||
                riff_extradata - riff_extradata_start) {
         avio_wl16(pb, riff_extradata - riff_extradata_start); /* cbSize */
     } /* else PCMWAVEFORMAT */


Other than that this looks good.

/Tomas


More information about the ffmpeg-devel mailing list