[FFmpeg-devel] [PATCH] Remove pointless, complex and probably wrong pts-handling in ea demuxer.
Reimar.Doeffinger at gmx.de
Sat Apr 9 16:20:38 CEST 2011
On Fri, Apr 08, 2011 at 12:54:00PM -0700, Baptiste Coudurier wrote:
> On 04/07/2011 01:29 PM, Reimar Döffinger wrote:
> > FFmpeg can and/or should figure out pts for audio on its own better
> > than what the demuxer does.
> I had this patch that works pretty well.
Unless I am missing something it's still a lot of code with the
only purpose of probably creating issues with seeking.
Is there any even tiny advantage in having this code at all?
(Even if there is, it would belong at a higher-level place since
other demuxers might profit from it as well).
> diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
> index 5408a1f..066acfe 100644
> --- a/libavformat/electronicarts.c
> +++ b/libavformat/electronicarts.c
> @@ -438,7 +438,7 @@ static int ea_read_header(AVFormatContext *s,
> st = av_new_stream(s, 0);
> if (!st)
> return AVERROR(ENOMEM);
> - av_set_pts_info(st, 33, 1, ea->sample_rate);
> + av_set_pts_info(st, 64, 1, ea->sample_rate);
This would be correct with my patch.
> - pkt->pts = 90000;
> - pkt->pts *= ea->audio_frame_counter;
> - pkt->pts /= ea->sample_rate;
> + pkt->pts = ea->audio_frame_counter;
However with your patch it would be wrong, since audio_frame_counter
More information about the ffmpeg-devel