[FFmpeg-user] AVIOContext in push mode

Gajanan H grhegde09 at gmail.com
Thu Dec 17 08:32:20 CET 2015


I am a libavformat noob. Please pardon if my question is stupid. I was
trying to modify and run the examples that are provided with ffmpeg. File
avio_reading.c shows how to read data into AVIOContext. As I understand
this uses pull mode, meaning AVIOContext calls read_packet callback
whenever it needs data to process.

I wanted to ask if it is possible to feed data into AVIOContext in push
mode. Is it possible to call some method on AVIOContext to push data into
it instead of relying on AVIOContext to cal a callback.

I tried creating AVIOContext without read_packet callback and used another
thread to call avio_write. But that didn't help. I get this error: "Could
not open input:-1094995529
Error occurred: Invalid data found when processing input"

I am attaching the test code I am using.

Any help would be appreciated.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: remuxing.c
Type: application/octet-stream
Size: 7672 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20151217/f919614a/attachment.obj>

More information about the ffmpeg-user mailing list