diff options
author | wm4 <nfxjfg@googlemail.com> | 2015-09-08 19:42:26 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-09-12 12:27:34 +0200 |
commit | 99404597201911de90cff2ef85f2d44176d39147 (patch) | |
tree | 0acd1a8bf5c6e82478a25cc45e223b93ddcc8e8c /libavcodec/mmaldec.c | |
parent | 87a051f97633010f71dfc1d23d806856499bf231 (diff) | |
download | ffmpeg-99404597201911de90cff2ef85f2d44176d39147.tar.gz |
mmaldec: fix pkt_dts determination
This also drops setting the frame->pts field. This is usually not set by
decoders, so this would be an inconsistency that's at worst a danger to
the API user.
It appears the buffer->dts field is normally not set by the MMAL
decoder, so don't use it. If it's ever going to be set by MMAL, we
don't know whether the value will be what we want.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/mmaldec.c')
-rw-r--r-- | libavcodec/mmaldec.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index a23a97fcfa..1099129975 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -621,10 +621,8 @@ static int ffmal_copy_frame(AVCodecContext *avctx, AVFrame *frame, } } - if (buffer->pts != MMAL_TIME_UNKNOWN) { - frame->pkt_pts = buffer->pts; - frame->pts = buffer->pts; - } + frame->pkt_pts = buffer->pts == MMAL_TIME_UNKNOWN ? AV_NOPTS_VALUE : buffer->pts; + frame->pkt_dts = AV_NOPTS_VALUE; done: return ret; |