[Libav-user] What is the meaning of return value -1 for av_interleaved_write_frame()

Kalileo kalileo at universalx.net
Wed Mar 21 10:29:28 CET 2012

On Mar 21, 2012, at 14:38 , Alex Cohn wrote:

> On Tue, Mar 20, 2012 at 12:32, Li Zhang <lizhang at utelisys.com> wrote:
>> The output is stream, which is send to a udp address real time using my customized output function.  The encoder is H264 and AAC. Container is TS.
>> Every time, the video frame writing will fail first and then it is audio frame.
>> Thanks!
>> Best regards,
>> Li
> I would suspect your custom output function in the first place. If as
> a result, write_packet() returns -1, or AVERROR(EPERM) - then this is
> what you get.
> Alex

Check also the DTS / PTS values in the frames you write - if they are not monotonically increasing you can get -1 too.

More information about the Libav-user mailing list