]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mxg.c
lavf: use conditional notation for default codec in muxer declarations.
[ffmpeg] / libavformat / mxg.c
index 2b69f7204f4340acaafbe3b82f7b3ecfa3b8c2ef..cb983f1462a06e03c828e213f235a4a87aecc2c4 100644 (file)
@@ -22,6 +22,7 @@
 #include "libavutil/intreadwrite.h"
 #include "libavcodec/mjpeg.h"
 #include "avformat.h"
+#include "internal.h"
 #include "avio.h"
 
 #define DEFAULT_PACKET_SIZE 1024
@@ -36,7 +37,7 @@ typedef struct MXGContext {
     unsigned int cache_size;
 } MXGContext;
 
-static int mxg_read_header(AVFormatContext *s, AVFormatParameters *ap)
+static int mxg_read_header(AVFormatContext *s)
 {
     AVStream *video_st, *audio_st;
     MXGContext *mxg = s->priv_data;
@@ -47,7 +48,7 @@ static int mxg_read_header(AVFormatContext *s, AVFormatParameters *ap)
         return AVERROR(ENOMEM);
     video_st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     video_st->codec->codec_id = CODEC_ID_MXPEG;
-    av_set_pts_info(video_st, 64, 1, 1000000);
+    avpriv_set_pts_info(video_st, 64, 1, 1000000);
 
     audio_st = avformat_new_stream(s, NULL);
     if (!audio_st)
@@ -58,7 +59,7 @@ static int mxg_read_header(AVFormatContext *s, AVFormatParameters *ap)
     audio_st->codec->sample_rate = 8000;
     audio_st->codec->bits_per_coded_sample = 8;
     audio_st->codec->block_align = 1;
-    av_set_pts_info(audio_st, 64, 1, 1000000);
+    avpriv_set_pts_info(audio_st, 64, 1, 1000000);
 
     mxg->soi_ptr = mxg->buffer_ptr = mxg->buffer = 0;
     mxg->buffer_size = 0;
@@ -239,11 +240,11 @@ static int mxg_close(struct AVFormatContext *s)
 }
 
 AVInputFormat ff_mxg_demuxer = {
-    .name = "mxg",
-    .long_name = NULL_IF_CONFIG_SMALL("MxPEG clip file format"),
+    .name           = "mxg",
+    .long_name      = NULL_IF_CONFIG_SMALL("MxPEG clip file format"),
     .priv_data_size = sizeof(MXGContext),
-    .read_header = mxg_read_header,
-    .read_packet = mxg_read_packet,
-    .read_close = mxg_close,
-    .extensions = "mxg"
+    .read_header    = mxg_read_header,
+    .read_packet    = mxg_read_packet,
+    .read_close     = mxg_close,
+    .extensions     = "mxg",
 };