[Libav-user] custom write_packet callback not being invoked
i have been trying to have a custom avio for write operations using ffmpeg/libav to write remuxed packets to a cache instead of a file or socket. read callbacks are working fine but write callback is never invoked. I followed example of
cout << "Output format not found " << output_format_name;
cout << "Creating all output contexts successful";
m_ofmt_ctx->pb = avio_ctx;
//m_ofmt_ctx->flags |= AVFMT_FLAG_CUSTOM_IO;
m_ofmt_ctx->oformat = ofmt;
I am thinking after this registration, any time there is a write function, like av_interleaved_write_frame() , the callback must be called.But the call invocation is not happening. Is there something i need to do other than above registration to make write callback work?
I tried both having and removing "m_ofmt_ctx->flags |= AVFMT_FLAG_CUSTOM_IO;"