diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-14 12:11:40 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-14 12:17:02 +0200 |
commit | 070c22d53a2bbd35e332770056b3d2e44a573bf3 (patch) | |
tree | 2fdcb1d4e7f48a9441d5bbfd3b045193a6675da9 /libavformat | |
parent | 2bac839bd3c3d0865199f4e7cc478afdb10b66c6 (diff) | |
parent | 3562684db716d11de0b0dcc52748e9cd90d68132 (diff) | |
download | ffmpeg-070c22d53a2bbd35e332770056b3d2e44a573bf3.tar.gz |
Merge commit '3562684db716d11de0b0dcc52748e9cd90d68132'
* commit '3562684db716d11de0b0dcc52748e9cd90d68132':
ogg: Always alloc the private context in vorbis_header
Conflicts:
libavformat/oggparsevorbis.c
See: 18b46a494ef3592d69f4638dac1ebb613c0f548d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/oggparsevorbis.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index d071a35fb6..7d525f43dc 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -237,15 +237,15 @@ vorbis_header (AVFormatContext * s, int idx) struct oggvorbis_private *priv; int pkt_type = os->buf[os->pstart]; - if (!(pkt_type & 1)) - return os->private ? 0 : -1; - if (!os->private) { os->private = av_mallocz(sizeof(struct oggvorbis_private)); if (!os->private) return -1; } + if (!(pkt_type & 1)) + return 0; + if (os->psize < 1 || pkt_type > 5) return -1; |