On 2018-11-21 3:13 p.m., Jaka Bac wrote:
On Wed, 21 Nov 2018 at 20:47, drwho <[email protected] <mailto:[email protected]>> wrote:

    Hello,

    The audio decoder example below fails to decode any file I've tried
    (mp3, opus, wav).....

    [mp2 @ 0x55d075c3d780] Header missing
    Error submitting the packet to the decoder

    https://libav.org/documentation/doxygen/master/decode__audio_8c_source.html

    Jon


Hello,

The audio decoding example specifically uses the MP2 audio codec to decode the audio.
It does this:
codec = avcodec_find_decoder(AV_CODEC_ID_MP2);

Hi Jaka,

I've tried changing it to

AV_CODEC_ID_MP3

error = [mp3 @ 0x56136ad2f780] Header missing

AV_CODEC_ID_OPUS

error = [opus @ 0x55caa0cb7200] Error parsing Opus packet header.

I've noticed that the packet size is always 0 after calling av_parser_parse2().  It would be nice to have an example for avcodec_send_packet() and avcodec_receive_frame() that works.

Jon

_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to