[FFmpeg-cvslog] r23572 - trunk/libavformat/sdp.c
lucabe
subversion
Fri Jun 11 10:01:45 CEST 2010
Author: lucabe
Date: Fri Jun 11 10:01:45 2010
New Revision: 23572
Log:
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".
Modified:
trunk/libavformat/sdp.c
Modified: trunk/libavformat/sdp.c
==============================================================================
--- trunk/libavformat/sdp.c Thu Jun 10 21:50:14 2010 (r23571)
+++ trunk/libavformat/sdp.c Fri Jun 11 10:01:45 2010 (r23572)
@@ -149,6 +149,19 @@ static char *extradata2psets(AVCodecCont
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) {
More information about the ffmpeg-cvslog
mailing list