[vlc-devel] [PATCH] demux: mp4: fix ADPCM_IMA_QT sample count calculation
Jean-Baptiste Kempf
jb at videolan.org
Sun Oct 28 08:17:50 CET 2018
LGTM
On Sat, 27 Oct 2018, at 21:42, Tristan Matthews wrote:
> Fixes #21348
> ---
> modules/demux/mp4/mp4.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
> index fe4baee4cc..7b7f03cabb 100644
> --- a/modules/demux/mp4/mp4.c
> +++ b/modules/demux/mp4/mp4.c
> @@ -3838,6 +3838,9 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t
> *p_track, uint32_t *pi_nb_samp
> case VLC_CODEC_GSM:
> *pi_nb_samples = 160 * p_track-
> >fmt.audio.i_channels;
> return 33 * p_track->fmt.audio.i_channels;
> + case VLC_CODEC_ADPCM_IMA_QT:
> + *pi_nb_samples = 64 * p_track-
> >fmt.audio.i_channels;
> + return 34 * p_track->fmt.audio.i_channels;
> default:
> break;
> }
> @@ -3920,6 +3923,10 @@ static uint64_t MP4_TrackGetPos( mp4_track_t
> *p_track )
> i_pos += ( p_track->i_sample -
> p_track->chunk[p_track-
> >i_chunk].i_sample_first ) / 160 * 33;
> return i_pos;
> + case VLC_CODEC_ADPCM_IMA_QT: /* # Samples > data size */
> + i_pos += ( p_track->i_sample -
> + p_track->chunk[p_track-
> >i_chunk].i_sample_first ) / 64 * 34;
> + return i_pos;
> default:
> break;
> }
> --
> 2.17.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
--
Jean-Baptiste Kempf - President
+33 672 704 734
More information about the vlc-devel
mailing list