2012/2/17 Pavel Sokolov <pavel at sokolov.me>: > May be I need to add some extra header to the packets? You can do it by duplicating AVCodecContext.extradata. avcodec_copy_context() can do that for you. -- Andrey Utkin