[FFmpeg-devel] [PATCH] mpeg: fix dvdaudio with multiple private streams
Michael Niedermayer
michaelni at gmx.at
Tue Aug 30 21:45:40 CEST 2011
On Mon, Aug 29, 2011 at 11:35:22AM -0700, Baptiste Coudurier wrote:
> ---
> libavformat/mpeg.c | 10 +++++++---
> 1 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
> index 364473a..e6e5cfb 100644
> --- a/libavformat/mpeg.c
> +++ b/libavformat/mpeg.c
> @@ -425,14 +425,16 @@ static int mpegps_read_packet(AVFormatContext *s,
> enum AVMediaType type;
> int64_t pts, dts, dummy_pos; //dummy_pos is needed for the index building to work
> uint8_t av_uninit(dvdaudio_substream_type);
> + int sub_id;
>
> redo:
> len = mpegps_read_pes_header(s, &dummy_pos, &startcode, &pts, &dts);
> if (len < 0)
> return len;
>
> + sub_id = startcode;
> if(startcode == 0x1bd) {
> - dvdaudio_substream_type = get_byte(s->pb);
> + sub_id = dvdaudio_substream_type = get_byte(s->pb);
> url_fskip(s->pb, 3);
> len -= 4;
> }
> @@ -440,7 +442,7 @@ static int mpegps_read_packet(AVFormatContext *s,
> /* now find stream */
> for(i=0;i<s->nb_streams;i++) {
> st = s->streams[i];
> - if (st->id == startcode)
> + if (st->id == sub_id)
> goto found;
> }
cant the dvdaudio_substream_type collide with startcode ?
also it might make sense to add a fate test, not sure though
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110830/d7cabd2b/attachment.asc>
More information about the ffmpeg-devel
mailing list