diff options
author | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2006-09-07 16:35:22 +0000 |
---|---|---|
committer | Guillaume Poirier <gpoirier@mplayerhq.hu> | 2006-09-07 16:35:22 +0000 |
commit | 2ad4648f973e74cd2d42b9cae95e06b7d920007b (patch) | |
tree | e18521bedd6c366f739369fc80001b51d1ebe8ad | |
parent | 2eb291c4bbb91fd9c0ab72d27701711e84c52793 (diff) | |
download | ffmpeg-2ad4648f973e74cd2d42b9cae95e06b7d920007b.tar.gz |
Allow to get the the track number in the IPRT (part) tag in AVI.
Patch by Panagiotis Issaris % takis P issaris A uhasselt P be %
Original thread:
Date: Sep 6, 2006 6:00 PM
Subject: [Ffmpeg-devel] [PATCH] Enable track tag in AVI
Originally committed as revision 6190 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/avidec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index bb4714f485..3ff034c989 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -215,6 +215,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) AVStream *st; AVIStream *ast = NULL; int xan_video = 0; /* hack to support Xan A/V */ + char str_track[4]; avi->stream_index= -1; @@ -479,6 +480,10 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) case MKTAG('I', 'P', 'R', 'D'): avi_read_tag(pb, s->album, sizeof(s->album), size); break; + case MKTAG('I', 'P', 'R', 'T'): + avi_read_tag(pb, str_track, sizeof(str_track), size); + sscanf(str_track, "%d", &s->track); + break; default: /* skip tag */ size += (size & 1); |