Re: [FFmpeg-devel] [RFC/PATCH]lavf/omadec: Fix timestamps for Atrac 3 lossless
2017-02-11 18:58 GMT+01:00 Paul B Mahol : > On 2/11/17, Carl Eugen Hoyos wrote: >> 2017-02-11 18:25 GMT+01:00 Paul B Mahol : >>> On 2/11/17, Carl Eugen Hoyos wrote: 2017-02-11 14:32 GMT+01:00 Paul B Mahol : > On 2/11/17, Carl Eugen Hoyos 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. >> >> New try attached. >> >> Thank you, Carl Eugen >> > > lgtm Patch applied. Thank you, Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [RFC/PATCH]lavf/omadec: Fix timestamps for Atrac 3 lossless
On 2/11/17, Carl Eugen Hoyos wrote: > 2017-02-11 18:25 GMT+01:00 Paul B Mahol : >> On 2/11/17, Carl Eugen Hoyos wrote: >>> 2017-02-11 14:32 GMT+01:00 Paul B Mahol : On 2/11/17, Carl Eugen Hoyos 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. > > New try attached. > > Thank you, Carl Eugen > lgtm ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [RFC/PATCH]lavf/omadec: Fix timestamps for Atrac 3 lossless
2017-02-11 18:25 GMT+01:00 Paul B Mahol : > On 2/11/17, Carl Eugen Hoyos wrote: >> 2017-02-11 14:32 GMT+01:00 Paul B Mahol : >>> On 2/11/17, Carl Eugen Hoyos 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. New try attached. Thank you, Carl Eugen From 40b6497e7716372545083be6704058afb2d404e4 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 11 Feb 2017 18:53:18 +0100 Subject: [PATCH] lavf/omadec: Fix packet duration for Atrac 3 lossless. --- libavformat/omadec.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavformat/omadec.c b/libavformat/omadec.c index 321e77e..fa53636 100644 --- a/libavformat/omadec.c +++ b/libavformat/omadec.c @@ -374,8 +374,13 @@ static int aal_read_packet(AVFormatContext *s, AVPacket *pkt) pkt->stream_index = 0; pkt->pos = pos; -pkt->pts = pts * 2048LL; -pkt->duration = 2048; +if (s->streams[0]->codecpar->codec_id == AV_CODEC_ID_ATRAC3AL) { +pkt->duration = 1024; +pkt->pts = pts * 1024LL; +} else { +pkt->duration = 2048; +pkt->pts = pts * 2048LL; +} return ret; } -- 1.7.10.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [RFC/PATCH]lavf/omadec: Fix timestamps for Atrac 3 lossless
On 2/11/17, Carl Eugen Hoyos wrote: > 2017-02-11 14:32 GMT+01:00 Paul B Mahol : >> On 2/11/17, Carl Eugen Hoyos 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. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [RFC/PATCH]lavf/omadec: Fix timestamps for Atrac 3 lossless
2017-02-11 14:32 GMT+01:00 Paul B Mahol : > On 2/11/17, Carl Eugen Hoyos 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 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [RFC/PATCH]lavf/omadec: Fix timestamps for Atrac 3 lossless
On 2/11/17, Carl Eugen Hoyos 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. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [RFC/PATCH]lavf/omadec: Fix timestamps for Atrac 3 lossless
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 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(-) 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; -- 1.7.10.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel