summaryrefslogtreecommitdiff
path: root/ffmpeg/libavformat/ffmdec.c
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
committerTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
commitf7813a5324be39d13ab536c245d15dfc602a7849 (patch)
treefad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavformat/ffmdec.c
parentb7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff)
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavformat/ffmdec.c')
-rw-r--r--ffmpeg/libavformat/ffmdec.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/ffmpeg/libavformat/ffmdec.c b/ffmpeg/libavformat/ffmdec.c
index 02cf790..9d89b16 100644
--- a/ffmpeg/libavformat/ffmdec.c
+++ b/ffmpeg/libavformat/ffmdec.c
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <stdint.h>
+
#include "libavutil/intreadwrite.h"
#include "libavutil/intfloat.h"
#include "avformat.h"
@@ -278,11 +280,8 @@ static int ffm2_read_header(AVFormatContext *s)
codec->flags2 = avio_rb32(pb);
codec->debug = avio_rb32(pb);
if (codec->flags & CODEC_FLAG_GLOBAL_HEADER) {
- codec->extradata_size = avio_rb32(pb);
- codec->extradata = av_malloc(codec->extradata_size);
- if (!codec->extradata)
+ if (ff_get_extradata(codec, pb, avio_rb32(pb)) < 0)
return AVERROR(ENOMEM);
- avio_read(pb, codec->extradata, codec->extradata_size);
}
avio_seek(pb, next, SEEK_SET);
id = avio_rb32(pb);
@@ -468,11 +467,8 @@ static int ffm_read_header(AVFormatContext *s)
goto fail;
}
if (codec->flags & CODEC_FLAG_GLOBAL_HEADER) {
- codec->extradata_size = avio_rb32(pb);
- codec->extradata = av_malloc(codec->extradata_size);
- if (!codec->extradata)
+ if (ff_get_extradata(codec, pb, avio_rb32(pb)) < 0)
return AVERROR(ENOMEM);
- avio_read(pb, codec->extradata, codec->extradata_size);
}
}