avformat/omadec: Subtract headersize in timestamp calculation
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 7 Feb 2015 20:16:20 +0000 (21:16 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 7 Feb 2015 20:16:20 +0000 (21:16 +0100)
Fixes pts/dts

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/omadec.c

index 6f3671b..2cb63ff 100644 (file)
@@ -430,9 +430,9 @@ static int oma_read_packet(AVFormatContext *s, AVPacket *pkt)
 
     pkt->stream_index = 0;
 
-    if (pos > 0 && byte_rate > 0) {
+    if (pos >= oc->content_start && byte_rate > 0) {
         pkt->pts =
-        pkt->dts = av_rescale(pos, st->time_base.den,
+        pkt->dts = av_rescale(pos - oc->content_start, st->time_base.den,
                               byte_rate * (int64_t)st->time_base.num);
     }