[Libav-user] Suggest how to propery fill incomming AVFrame pointer in a decoder !

2016-08-13 Thread ssshukla26
My video decoder is decoding both mp4 files and h264 files. I just wanted to
make sure that the way am filling incoming AVFrame pointer is proper or not,
code snippet as shown below.

int *qhw_decode_frame* (AVCodecContext *avctx, *void *pFrame*, int
*got_frame, AVPacket *avpkt)
{
...
AVFrame *avframe = (AVFrame *) pFrame;
avframe->width  = avctx->width; //width is1920
avframe->height = avctx->height; //height is 1080
avframe->format = AV_PIX_FMT_YUV420P;

if(!(*av_frame_get_buffer(avframe,1)* < 0))
{
 //Copy decoded data to avframe->data pointer.
}
...
}


The above is the only a snippet of the code. I just want to understand that
using *av_frame_get_buffer* is correct way to get data buffers to fill
decoded data ?

I am copying decoded data in data buffer of avframe pointer, is that correct
?

The reason am asking this question is with ffmpeg my above code is working
but when I integrate my ffmpeg with chromium, its crashing when I copy
decoded data to avframe data pointers !



--
View this message in context: 
http://libav-users.943685.n4.nabble.com/Libav-user-Suggest-how-to-propery-fill-incomming-AVFrame-pointer-in-a-decoder-tp4662417.html
Sent from the libav-users mailing list archive at Nabble.com.
___
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user


Re: [Libav-user] Need to understand where demuxer for mp4 is hooked with h264 decoder ?

2016-08-13 Thread ssshukla26
Yup, extradata has the header data, I was able to decode mp4 data correctly
by passing extradata to my decoder.



--
View this message in context: 
http://libav-users.943685.n4.nabble.com/Libav-user-Need-to-understand-where-demuxer-for-mp4-is-hooked-with-h264-decoder-tp4662406p4662416.html
Sent from the libav-users mailing list archive at Nabble.com.
___
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user


Re: [Libav-user] Need to understand where demuxer for mp4 is hooked with h264 decoder ?

2016-08-13 Thread Carl Eugen Hoyos
2016-08-10 14:01 GMT+02:00 ssshukla26 :
> Hi, It seems *demuxer for mp4* is sending data to decoder but without
> *headers* (i.e. sps and pps) and the packets received is having only *size*
> (first 4 bytes) at the beginning.

Did you check extradata / test with mpegts?

Carl Eugen
___
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user