[Ffmpeg-devel] Re: Fwd: Is AVFrame->pts really set by libavcodec when

Luca Abeni lucabe72
Wed Apr 18 14:54:41 CEST 2007


Hi,

QuickTime wrote:
[...]
> You should set the flags:AVFMT_FLAG_GENPTS in AVFormatContext
> 
>    if(av_open_input_file(&ic,filename,NULL,0,NULL) < 0)
>        return -1;
>    ic->flags |= AVFMT_FLAG_GENPTS;
>    if(av_find_stream_info(ic) < 0){
>        ret = -1;
>        goto return_pos;
>    }
Thanks for the answer. I did not try yet, but I do not think this will 
fix my problem: the packet pts and dts (generated by libavformat) are 
currently ok (in fact, I am now using such timestamps instead of the 
codec's one); it's the avframe pts (generated by the decoder) which is 
wrong...
Since AVFMT_FLAG_GENPTS is a "format flag", I do not think it can help 
in this case (it will change the way libavformat generates the pts, but 
I do not think it can change libavcodec's behaviour).


			Thanks,
				Luca





More information about the ffmpeg-devel mailing list