[Ffmpeg-devel] [PATCH] compile with demux only part 2
Loïc Le Loarer
lll+ffmpeg
Wed Nov 29 19:30:50 CET 2006
Le Saturday 11 November 2006 ? 10:20:14 +0100, Stefan Gehrer a ?crit:
> Loic wrote:
> >Hi,
> >
> >I'm trying to compile libavformat and libavcodec with demuxers only (I
> >have a test program which only dumps the raw streams inside any
> >container). I'm using the configure line:
> >./configure --enable-gpl --disable-encoders --disable-muxers
> >--disable-decoders
> >
> >And I observe the following errors when trying to link libavformat and
> >libavcodec in my program:
> >libavformat/libavformat.a(rtp.o): In function `rtp_check_and_send_back_rr':
> >libavformat/rtp.c:387: undefined reference to `url_open_dyn_buf'
> >libavformat/rtp.c:443: undefined reference to `url_close_dyn_buf'
> >libavcodec/libavcodec.a(parser.o): In function `cavsvideo_parse':
> >libavcodec/parser.c:376: undefined reference to `ff_cavs_find_frame_end'
> >
> I found the time to do something about the cavs parsing.
> As said before, I moved the parsing into cavs.c and added the
> proper ifdefs. I also needed to make mpeg4video_split from
> parser.c public and thus renamed it to ff_mpeg4video_split.
> This should make it possible to build with any combination of
> CONFIG_CAVSVIDEO_PARSER and CONFIG_CAVS_DECODER.
[ patch splited and then applied]
Thank you very much for your change, Stefan!
There is only one small problem left to have libavformat compile with
--disable-muxers option to configure :
libavformat/libavformat.a(rtp.o): In function ? rtp_check_and_send_back_rr ?:
libavformat/rtp.c:381: undefined reference to `url_open_dyn_buf'
libavformat/rtp.c:437: undefined reference to `url_close_dyn_buf'
collect2: ld returned 1 exit status
Please find attached the patch I haved tested to fix the problem.
What do you think of this.
--
Lo?c
"heaven is not a place, it's a feeling"
-------------- next part --------------
Index: libavformat/aviobuf.c
===================================================================
--- libavformat/aviobuf.c (r?vision 7184)
+++ libavformat/aviobuf.c (copie de travail)
@@ -136,12 +136,12 @@
fill_buffer(s);
s->buf_ptr = s->buf_end + offset - s->pos;
} else {
-#ifdef CONFIG_MUXERS
+#if defined(CONFIG_MUXERS) || defined(CONFIG_NETWORK)
if (s->write_flag) {
flush_buffer(s);
s->must_flush = 1;
} else
-#endif //CONFIG_MUXERS
+#endif // defined(CONFIG_MUXERS) || defined(CONFIG_NETWORK)
{
s->buf_end = s->buffer;
}
@@ -622,7 +622,9 @@
return s->max_packet_size;
}
-#ifdef CONFIG_MUXERS
+// url_open_dyn_buf and url_close_dyn_buf are used in rtp.c to send response back
+// to server even if CONFIG_MUXERS is not set.
+#if defined(CONFIG_MUXERS) || defined(CONFIG_NETWORK)
/* buffer handling */
int url_open_buf(ByteIOContext *s, uint8_t *buf, int buf_size, int flags)
{
@@ -785,4 +787,4 @@
av_free(d);
return size;
}
-#endif //CONFIG_MUXERS
+#endif // CONFIG_MUXERS || CONFIG_NETWORK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20061129/ce09896d/attachment.pgp>
More information about the ffmpeg-devel
mailing list