Commit 732afb8f authored by lucabe's avatar lucabe

Use a bitstream filter for converting the extradata syntax when generating an SDP.

This allows to generate correct SDPs for H.264 video in "MP4 syntax".


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23572 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 35ff01e1
......@@ -149,6 +149,19 @@ static char *extradata2psets(AVCodecContext *c)
return NULL;
}
if (c->extradata[0] == 1) {
uint8_t *dummy_p;
int dummy_int;
AVBitStreamFilterContext *bsfc= av_bitstream_filter_init("h264_mp4toannexb");
if (!bsfc) {
av_log(c, AV_LOG_ERROR, "Cannot open the h264_mp4toannexb BSF!\n");
return NULL;
}
av_bitstream_filter_filter(bsfc, c, NULL, &dummy_p, &dummy_int, NULL, 0, 0);
av_bitstream_filter_close(bsfc);
}
psets = av_mallocz(MAX_PSET_SIZE);
if (psets == NULL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment