Commit c2841b22 authored by Martin Storsjö's avatar Martin Storsjö Committed by Jean-Baptiste Kempf

omxil: Pass pts as timestamp on the ducati decoder

This decoder reorders timestamps according to the frame reordering,
and thus should be given pts instead of dts. Other decoders don't
do this reordering and should be given dts.

Still to be investigated how android/stagefright handles this,
since it always seems pass pts, not dts, to decoders.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 98be9ffa
......@@ -910,6 +910,7 @@ loaded:
p_sys->out.p_fmt = &p_dec->fmt_out;
p_sys->ports = 2;
p_sys->p_ports = &p_sys->in;
p_sys->b_use_pts = 0;
msg_Dbg(p_dec, "fmt in:%4.4s, out: %4.4s", (char *)&p_dec->fmt_in.i_codec,
(char *)&p_dec->fmt_out.i_codec);
......@@ -1051,6 +1052,8 @@ loaded:
if(p_sys->b_error) goto error;
p_dec->b_need_packetized = true;
if (!strcmp(p_sys->psz_component, "OMX.TI.DUCATI1.VIDEO.DECODER"))
p_sys->b_use_pts = 1;
return VLC_SUCCESS;
error:
......@@ -1270,6 +1273,9 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
p_header->nFilledLen = p_block->i_buffer;
p_header->nOffset = 0;
p_header->nFlags = OMX_BUFFERFLAG_ENDOFFRAME;
if (p_sys->b_use_pts)
p_header->nTimeStamp = p_block->i_pts;
else
p_header->nTimeStamp = p_block->i_dts;
/* In direct mode we pass the input pointer as is.
......
......@@ -103,6 +103,7 @@ struct decoder_sys_t
date_t end_date;
int i_nal_size_length; /* Length of the NAL size field for H264 */
int b_use_pts;
OMX_BUFFERHEADERTYPE sentinel_buffer;
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment