/*****************************************************************************
* mux.c: muxer using ffmpeg (libavformat).
*****************************************************************************
- * Copyright (C) 2006 VideoLAN
+ * Copyright (C) 2006 the VideoLAN team
* $Id: demux.c 8444 2004-08-17 08:21:07Z gbazin $
*
* Authors: Gildas Bazin <gbazin@videolan.org>
#include <stdlib.h> /* malloc(), free() */
#include <vlc/vlc.h>
-#include <vlc/input.h>
-#include <vlc/sout.h>
+#include <vlc_block.h>
+#include <vlc_sout.h>
/* ffmpeg header */
#ifdef HAVE_FFMPEG_AVFORMAT_H
# include <ffmpeg/avformat.h>
-#else
+#elif defined(HAVE_LIBAVFORMAT_TREE)
# include <avformat.h>
#endif
//#define AVFORMAT_DEBUG 1
/* Version checking */
-#if (LIBAVFORMAT_BUILD >= 4687) && (defined(HAVE_FFMPEG_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_TREE))
+#if defined(HAVE_FFMPEG_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_TREE)
/*****************************************************************************
* mux_sys_t: mux descriptor
*****************************************************************************/
int E_(OpenMux)( vlc_object_t *p_this )
{
+ AVOutputFormat *file_oformat;
sout_mux_t *p_mux = (sout_mux_t*)p_this;
sout_mux_sys_t *p_sys;
AVFormatParameters params, *ap = ¶ms;
av_register_all();
/* Find the requested muxer */
- AVOutputFormat *file_oformat =
+ file_oformat =
guess_format(NULL, p_mux->p_access->psz_name, NULL);
if (!file_oformat)
{
block_t *p_data = block_FifoGet( p_input->p_fifo );
int i_stream = *((int *)p_input->p_sys);
AVStream *p_stream = p_sys->oc->streams[i_stream];
- AVPacket pkt = {0};
+ AVPacket pkt;
+
+ memset( &pkt, 0, sizeof(AVPacket) );
av_init_packet(&pkt);
pkt.data = p_data->p_buffer;
return 0;
}
-#else /* LIBAVFORMAT_BUILD >= 4687 */
+#else /* HAVE_FFMPEG_AVFORMAT_H */
int E_(OpenMux)( vlc_object_t *p_this )
{
{
}
-#endif /* LIBAVFORMAT_BUILD >= 4687 */
+#endif /* HAVE_FFMPEG_AVFORMAT_H */