[FFmpeg-devel] [PATCH] avformat/mp3dec: fix gapless audio support
Michael Niedermayer
michaelni at gmx.at
Sat Sep 20 12:59:51 CEST 2014
On Sat, Sep 20, 2014 at 11:10:19AM +0200, wm4 wrote:
> The code already had skipping of initial padding, but discarding
> trailing frame padding was missing.
>
> This is somewhat questionable, because it will make the decoder discard
> any data after the declared file size in the LAME header. But note that
> skipping full frames at the end of the stream is required. Encoders
> actually create such files.
>
> ---
> By the way, can someone explain to me why mp3dec adjusts st->start_time?
> It looks like this will be propagated to AVFormatContext.start_time. But
> I would expect that the start time of mp3s is always 0, and that
> libavcodec does _not_ change the timestamp of the first packet.
> ---
> libavformat/avformat.h | 8 ++++++++
> libavformat/mp3dec.c | 1 +
> libavformat/utils.c | 17 ++++++++++++++++-
> 3 files changed, 25 insertions(+), 1 deletion(-)
breaks fate-exif-image-embedded
--- ./tests/ref/fate/exif-image-embedded 2014-09-19 16:37:27.026513665 +0200
+++ tests/data/fate/exif-image-embedded 2014-09-20 12:48:39.308044761 +0200
@@ -42,363 +42,3 @@
channels=2
channel_layout=stereo
[/FRAME]
-[FRAME]
-media_type=audio
-key_frame=1
-pkt_pts=368640
-pkt_pts_time=0.026122
-pkt_dts=368640
-pkt_dts_time=0.026122
-best_effort_timestamp=368640
-best_effort_timestamp_time=0.026122
-pkt_duration=368640
-pkt_duration_time=0.026122
-pkt_pos=16709
-pkt_size=418
-sample_fmt=s16p
-nb_samples=1152
...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140920/63a52ace/attachment.asc>
More information about the ffmpeg-devel
mailing list