]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpdec_mpeg4.c
Merge commit '39a2d3288e82e4e576c03efb32179ef5a19fff50'
[ffmpeg] / libavformat / rtpdec_mpeg4.c
index 70e51f862c1ac86b3f97604257a7e5f739af99b7..37602925ff20806341a061447ae4a1dfbf7e97dc 100644 (file)
@@ -97,14 +97,14 @@ static void close_context(PayloadContext *data)
     av_freep(&data->mode);
 }
 
-static int parse_fmtp_config(AVCodecContext *codec, const char *value)
+static int parse_fmtp_config(AVCodecParameters *par, char *value)
 {
     /* decode the hexa encoded parameter */
     int len = ff_hex_to_data(NULL, value);
-    av_freep(&codec->extradata);
-    if (ff_alloc_extradata(codec, len))
+    av_freep(&par->extradata);
+    if (ff_alloc_extradata(par, len))
         return AVERROR(ENOMEM);
-    ff_hex_to_data(codec->extradata, value);
+    ff_hex_to_data(par->extradata, value);
     return 0;
 }
 
@@ -274,17 +274,17 @@ static int parse_fmtp(AVFormatContext *s,
                       AVStream *stream, PayloadContext *data,
                       const char *attr, const char *value)
 {
-    AVCodecContext *codec = stream->codec;
+    AVCodecParameters *par = stream->codecpar;
     int res, i;
 
     if (!strcmp(attr, "config")) {
-        res = parse_fmtp_config(codec, value);
+        res = parse_fmtp_config(par, value);
 
         if (res < 0)
             return res;
     }
 
-    if (codec->codec_id == AV_CODEC_ID_AAC) {
+    if (par->codec_id == AV_CODEC_ID_AAC) {
         /* Looking for a known attribute */
         for (i = 0; attr_names[i].str; ++i) {
             if (!av_strcasecmp(attr, attr_names[i].str)) {