Vladimir Eremeev <[EMAIL PROTECTED]> writes:
I am sorry, I forgot two "&"s.
> Ok, this is the minimum case:
>
AVFormatContext *input;
AVPacket pkt;
AVFormatParameters ap;
input=av_alloc_format_context();
input->iformat=av_find_input_format("mpegts");
bio_buffer=(unsigned char *)malloc(bio_buffer_size); //=188
input->pb=av_alloc_put_byte(bio_buffer,bio_buffer_size,
0,this,linsys_read,NULL,NULL);
input->pb->is_streamed=1;
input->pb->max_packet_size=188;
input->flags|=AVFMT_NOFILE|AVFMT_FLAG_IGNIDX;
input->max_index_size=1024*50;
input->max_picture_buffer=1024*100;
memset(&ap, 0, sizeof(ap));
ap.prealloced_context=1;
int r=av_open_input_stream(&input,input->pb,"linsys",input->iformat,&ap);
r=av_find_stream_info(input);
while(!is_exiting()){
av_read_frame(input,&pkt); //address, of cource, not reference
av_free_packet(&pkt); //same thing
}
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user