Hi all,

Here's my problem : I'm trying to build from scratch a basic streaming video
player. I started with a simple local player which works greatly ! Then I
splitted the application to have on one side a server part designed for
sending regularly some audio and video packets, and on the other side the
client playing them.

My concern is related with the video header. I couldn't find any way to
properly send the video header to the client so that it could build an
AVFormatContext. So I'm trying to send both audio and video AVCodecContext
generated with

av_open_input_file(&pFormatCtx, filename, NULL, 0, NULL);
pCodecCtx=pFormatCtx->streams[videoStream]->codec;

I noticed some data fields of AVCodecContext are pointers. I tried to find
which of these are required for building a working decoder.

uint8_t * extradata; was required.
I also made get_buffer and release_buffer pointed toward
avcodec_default_get_buffer and avcodec_default_release_buffer.

Like this, it's working for one of my video extract (avi movie with mpeg4
codec), but not with my others test files (one with mpeg4, one with mpeg1).

My question then is : which of the AVCodecStruct data fields are required
for getting "avcodec_decode_video" not producing a segfault...

Unless there is another proper way to send video header.

As you way have noticed I am still learning about video decoding. Thanks in
advance for any advice that could help me moving forward.

Thibault
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to