* @param s context containing RMContext and ByteIOContext for stream reading
* @param st the stream that the MDPR chunk belongs to and where to store the
* parameters read from the chunk into
+ * @param codec_data_size size of the MDPR chunk
* @return 0 on success, errno codes on error
*/
-int ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVStream *st);
+int ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVStream *st, int codec_data_size);
/**
* Parse one rm-stream packet from the input bytestream.
}
int
-ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVStream *st)
+ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVStream *st, int codec_data_size)
{
ByteIOContext *pb = s->pb;
unsigned int v;
- int codec_data_size, size;
+ int size;
int64_t codec_pos;
- codec_data_size = get_be32(pb);
codec_pos = url_ftell(pb);
v = get_be32(pb);
if (v == MKTAG(0xfd, 'a', 'r', '.')) {
get_str8(pb, buf, sizeof(buf)); /* mimetype */
st->codec->codec_type = CODEC_TYPE_DATA;
av_set_pts_info(st, 64, 1, 1000);
- if (ff_rm_read_mdpr_codecdata(s, st) < 0)
+ if (ff_rm_read_mdpr_codecdata(s, st, get_be32(pb)) < 0)
return -1;
break;
case MKTAG('D', 'A', 'T', 'A'):