diff mbox

[FFmpeg-devel,RFC/PATCH] lavf/omadec: Fix timestamps for Atrac 3 lossless

Message ID 201702111355.05269.cehoyos@ag.or.at
State Superseded
Headers show

Commit Message

Carl Eugen Hoyos Feb. 11, 2017, 12:55 p.m. UTC
Hi!

Attached patch fixes timestamps and duration for atrac_3_lossless_132kbps.aa3 
from ticket #5334, the only Atrac 3 lossless sample I have.

Please comment, Carl Eugen
From d1a22a151cc02fc475710c20576ecbed7c66aeac Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <cehoyos@ag.or.at>
Date: Sat, 11 Feb 2017 13:51:12 +0100
Subject: [PATCH] lavf/omadec: Fix timestamps for Atrac 3 lossless.

---
 libavformat/omadec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol Feb. 11, 2017, 1:32 p.m. UTC | #1
On 2/11/17, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
> Hi!
>
> Attached patch fixes timestamps and duration for
> atrac_3_lossless_132kbps.aa3
> from ticket #5334, the only Atrac 3 lossless sample I have.
>
> Please comment, Carl Eugen
>

This is wrong thing to do, packets duration should be half of what is
set for atrac3al.
Carl Eugen Hoyos Feb. 11, 2017, 4:24 p.m. UTC | #2
2017-02-11 14:32 GMT+01:00 Paul B Mahol <onemda@gmail.com>:
> On 2/11/17, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:

>> Attached patch fixes timestamps and duration for
>> atrac_3_lossless_132kbps.aa3
>> from ticket #5334, the only Atrac 3 lossless sample I have.
>>
>> Please comment, Carl Eugen
>
> This is wrong thing to do, packets duration should be half
> of what is set for atrac3al.

Where can this be done?

Carl Eugen
Paul B Mahol Feb. 11, 2017, 5:25 p.m. UTC | #3
On 2/11/17, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
> 2017-02-11 14:32 GMT+01:00 Paul B Mahol <onemda@gmail.com>:
>> On 2/11/17, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
>
>>> Attached patch fixes timestamps and duration for
>>> atrac_3_lossless_132kbps.aa3
>>> from ticket #5334, the only Atrac 3 lossless sample I have.
>>>
>>> Please comment, Carl Eugen
>>
>> This is wrong thing to do, packets duration should be half
>> of what is set for atrac3al.
>
> Where can this be done?

In demuxer, when packet duration is set.
diff mbox

Patch

diff --git a/libavformat/omadec.c b/libavformat/omadec.c
index 076da78..96fdeea 100644
--- a/libavformat/omadec.c
+++ b/libavformat/omadec.c
@@ -501,7 +501,7 @@  static int oma_read_header(AVFormatContext *s)
         st->codecpar->channels    = 2;
         st->codecpar->channel_layout = AV_CH_LAYOUT_STEREO;
         st->codecpar->sample_rate = 44100;
-        avpriv_set_pts_info(st, 64, 1, 44100);
+        avpriv_set_pts_info(st, 64, 1, 44100 * st->codecpar->channels);
         oc->read_packet = aal_read_packet;
         framesize = 4096;
         break;