OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
140dbcf
)
mpegpsdec: fix reading first mpegps packet
author
Arne de Bruijn
<mail@arnedebruijn.nl>
Sat, 17 Sep 2011 12:59:00 +0000
(14:59 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 17 Sep 2011 23:57:56 +0000
(
01:57
+0200)
libavformat/mpeg.c
patch
|
blob
|
history
diff --git
a/libavformat/mpeg.c
b/libavformat/mpeg.c
index
dc5d264
..
c58e072
100644
(file)
--- a/
libavformat/mpeg.c
+++ b/
libavformat/mpeg.c
@@
-106,6
+106,7
@@
static int mpegps_read_header(AVFormatContext *s,
MpegDemuxContext *m = s->priv_data;
const char *sofdec = "Sofdec";
int v, i = 0;
+ int64_t last_pos = avio_tell(s->pb);
m->header_state = 0xff;
s->ctx_flags |= AVFMTCTX_NOHEADER;
@@
-119,6
+120,9
@@
static int mpegps_read_header(AVFormatContext *s,
m->sofdec = (m->sofdec == 6) ? 1 : 0;
+ if (!m->sofdec)
+ avio_seek(s->pb, last_pos, SEEK_SET);
+
/* no need to do more */
return 0;
}