[libav-bugs] [Bug 642] aac encoding: infinitely returning data even if fed 0/empty input

bugzilla at libav.org bugzilla at libav.org
Thu Feb 20 21:11:33 CET 2014


https://bugzilla.libav.org/show_bug.cgi?id=642

--- Comment #2 from Thiago Santos <thiagossantos at gmail.com> 2014-02-20 21:11:33 CET ---
gst-libav will continue pushing (In reply to comment #1)
> What is the NULL input exactly? a frame without samples or a NULL pointer?

NULL pointer, linesize = 0

> 
> The AVFrame *frame parameter of avcodec_encode_audio2() is documented as:
> 
>  * @param[in] frame AVFrame containing the raw audio data to be encoded.
>  *                  May be NULL when flushing an encoder that has the
>  *                  CODEC_CAP_DELAY capability set.
> 
> and the aac encoder sets CODEC_CAP_DELAY.
> 
> I suspect the encoder sets *got_packet_ptr and returns empty packets if feeded
> with empty input frames. It's a little strange but works as advertised.

Is it safe to assume that when an encoder is fed with NULL data and returns a
packet with 0 duration it means that it has flushed? The returned value from
the avcodec_encode_audio2 call is also 0. If all 3 conditions are met, can
gst-libav consider the stream is over?

The issue is mostly that it still marks the got_packet_ptr as true, and the
returned packet has 6 bytes. Likely an empty aac frame?

-- 
Configure bugmail: https://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the libav-bugs mailing list