[FFmpeg-trac] #9911(avcodec:new): block align not set

FFmpeg trac at avcodec.org
Fri Sep 9 04:11:43 EEST 2022


#9911: block align not set
------------------------------------+-----------------------------------
             Reporter:  Mia Sia     |                    Owner:  (none)
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avcodec
              Version:  git-master  |               Resolution:
             Keywords:  AIFF        |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+-----------------------------------
Changes (by Mia Sia):

 * component:  undetermined => avcodec


Old description:

> Summary of the bug:
>
> libavcodwc/utils.c
> In "av_get_exact_bits_per_sample" function,
>
> case AV_CODEC_ID_ADPCM_G722
> ...
>     return 4;
>
> and
>
> libavformat/aiffdec.c
> In "get_aiff_header" function,
>
> if (!par->block_align)
>     par->block_align = (av_get_bits_per_sample(par->codec_id) * channels)
> >> 3
>
> which output 0, causes
>
> ffmpeg -i input.wav -c:a g722 output.afc
> [aiff @ 0x14af06f90] block align not set
> Could not write header for output file #0 (incorrect codec parameters ?):
> Invalid argument
> Error initializing output stream 0:0 --

New description:

 Summary of the bug:

 libavcodec/utils.c
 In "av_get_exact_bits_per_sample" function,

 case AV_CODEC_ID_ADPCM_G722
 ...
     return 4;

 and

 libavformat/aiffdec.c
 In "get_aiff_header" function,

 if (!par->block_align)
     par->block_align = (av_get_bits_per_sample(par->codec_id) * channels)
 >> 3

 which output 0, causes

 C:\Users\user\Downloads>ffmpeg -i in.wav -c:a g722 out.afc -hide_banner
 Guessed Channel Layout for Input Stream #0.0 : stereo
 Input #0, wav, from 'in.wav':
   Metadata:
     encoder         : Lavf59.23.100
   Duration: 00:00:10.00, bitrate: 1536 kb/s
   Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo,
 s16, 1536 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (pcm_s16le (native) -> adpcm_g722 (g722))
 Press [q] to stop, [?] for help
 [aiff @ 00000229e62ef440] block align not set
 Could not write header for output file #0 (incorrect codec parameters ?):
 Invalid argument
 Error initializing output stream 0:0 --
 Conversion failed!

--
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9911#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list