Ticket #9244: tiket9244_patch_1.diff

File tiket9244_patch_1.diff, 924 bytes (added by v0lt, 16 months ago)

If the "-write_channel_mask false" key is used, then do not use WAVEFORMATEXTENSIBLE (if possible).

  • libavformat/riffenc.c

     libavformat/riffenc.c | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c
    index 179b0f12cb..6ce6a1659f 100644
    a b int ff_put_wav_header(AVFormatContext *s, AVIOContext *pb,  
    7676     * for indicating packet duration. */
    7777    frame_size = av_get_audio_frame_duration2(par, par->block_align);
    7878
    79     waveformatextensible = (par->ch_layout.order == AV_CHANNEL_ORDER_NATIVE &&
     79    waveformatextensible = (par->ch_layout.order == AV_CHANNEL_ORDER_NATIVE && !(flags & FF_PUT_WAV_HEADER_SKIP_CHANNELMASK) &&
    8080                            av_channel_layout_compare(&par->ch_layout, &(AVChannelLayout)AV_CHANNEL_LAYOUT_MONO) &&
    8181                            av_channel_layout_compare(&par->ch_layout, &(AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO)) ||
    8282                           par->sample_rate > 48000 ||