[FFmpeg-cvslog] avformat/mxfdec: use the common packet pts setter function for opatom files

Marton Balint git at videolan.org
Sat Sep 23 20:22:41 EEST 2017


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Thu Sep  7 16:17:59 2017 +0200| [01911b9b3cad85ff1c346165659c0181db661b3e] | committer: Marton Balint

avformat/mxfdec: use the common packet pts setter function for opatom files

Fixes ticket #6631.

Signed-off-by: Marton Balint <cus at passwd.hu>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=01911b9b3cad85ff1c346165659c0181db661b3e
---

 libavformat/mxfdec.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 3e2f5011ee..476d284c96 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -3217,15 +3217,9 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
 
     pkt->stream_index = st->index;
 
-    if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && t->ptses &&
-        mxf->current_edit_unit >= 0 && mxf->current_edit_unit < t->nb_ptses) {
-        pkt->dts = mxf->current_edit_unit + t->first_dts;
-        pkt->pts = t->ptses[mxf->current_edit_unit];
-    } else if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
-        int ret = mxf_set_audio_pts(mxf, st->codecpar, pkt);
-        if (ret < 0)
-            return ret;
-    }
+    ret = mxf_set_pts(mxf, st, pkt, next_pos);
+    if (ret < 0)
+        return ret;
 
     mxf->current_edit_unit += edit_units;
 



More information about the ffmpeg-cvslog mailing list