[FFmpeg-devel] [PATCH] Make ffmpeg.c use picture.pkt_pts in place of reordered_opaque, which is deprecated for this use.
Michael Niedermayer
michaelni
Fri Jan 28 02:32:30 CET 2011
On Thu, Jan 27, 2011 at 09:26:49PM +0100, Stefano Sabatini wrote:
> ---
> ffmpeg.c | 8 +++-----
> 1 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 691b73e..cde7488 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -1493,8 +1493,6 @@ static int output_packet(AVInputStream *ist, int ist_index,
>
> if(pkt->dts != AV_NOPTS_VALUE)
> ist->next_pts = ist->pts = av_rescale_q(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q);
> - if(pkt->pts != AV_NOPTS_VALUE)
> - pkt_pts = av_rescale_q(pkt->pts, ist->st->time_base, AV_TIME_BASE_Q);
>
> //while we have more to decode or while the decoder did output something on EOF
> while (avpkt.size > 0 || (!pkt && ist->next_pts != ist->pts)) {
> @@ -1547,8 +1545,6 @@ static int output_packet(AVInputStream *ist, int ist_index,
> decoded_data_size = (ist->st->codec->width * ist->st->codec->height * 3) / 2;
> /* XXX: allocate picture correctly */
> avcodec_get_frame_defaults(&picture);
> - ist->st->codec->reordered_opaque = pkt_pts;
> - pkt_pts = AV_NOPTS_VALUE;
>
> ret = avcodec_decode_video2(ist->st->codec,
> &picture, &got_picture, &avpkt);
the purpose of the code you remove was to make sure that if there are several
video frames encoded in a packet then only the first would get the packet pts
associated with it.
[... ]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110128/098321bd/attachment.pgp>
More information about the ffmpeg-devel
mailing list