summaryrefslogtreecommitdiffstats
path: root/libavformat/mxg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-20 02:23:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-20 02:34:51 +0200
commitd0492578c805cfd41673aa2cdadf52efde40e307 (patch)
tree14fa2c0efa9f3a2c16d946cad36bc10edf0b39f6 /libavformat/mxg.c
parent9ef714328c9527f67be193a120821048b1fe86b5 (diff)
parent8096fdf0b6886305ea1a8cb2c869ab2732cd8e11 (diff)
downloadffmpeg-streaming-d0492578c805cfd41673aa2cdadf52efde40e307.zip
ffmpeg-streaming-d0492578c805cfd41673aa2cdadf52efde40e307.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: presets: rename presets directory lavc: make avcodec_get_context_defaults3 "officially" public lavf: replace av_new_stream->avformat_new_stream part II. lavf,lavd: replace av_new_stream->avformat_new_stream part I. lavf: add avformat_new_stream as a replacement for av_new_stream. Use correct scaling table for bwd-pred MVs in second B-field Ut Video decoder Makefile: change presets extension to .avpreset lavfi: add rgbtestsrc source, ported from MPlayer libmpcodecs lavfi: add testsrc source AVOptions: add documentation. presets: update libx264 ffpresets Conflicts: Changelog doc/APIchanges doc/ffmpeg.texi ffpresets/libx264-ipod320.ffpreset ffpresets/libx264-ipod640.ffpreset ffserver.c libavcodec/avcodec.h libavcodec/options.c libavcodec/version.h libavdevice/libdc1394.c libavfilter/avfilter.h libavfilter/vsrc_testsrc.c libavformat/flvdec.c libavformat/riff.c libavformat/version.h libavformat/wtv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mxg.c')
-rw-r--r--libavformat/mxg.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libavformat/mxg.c b/libavformat/mxg.c
index e884311..04991b3 100644
--- a/libavformat/mxg.c
+++ b/libavformat/mxg.c
@@ -24,8 +24,6 @@
#include "avformat.h"
#include "avio.h"
-#define VIDEO_STREAM_INDEX 0
-#define AUDIO_STREAM_INDEX 1
#define DEFAULT_PACKET_SIZE 1024
#define OVERREAD_SIZE 3
@@ -44,14 +42,14 @@ static int mxg_read_header(AVFormatContext *s, AVFormatParameters *ap)
MXGContext *mxg = s->priv_data;
/* video parameters will be extracted from the compressed bitstream */
- video_st = av_new_stream(s, VIDEO_STREAM_INDEX);
+ video_st = avformat_new_stream(s, NULL);
if (!video_st)
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);
- audio_st = av_new_stream(s, AUDIO_STREAM_INDEX);
+ audio_st = avformat_new_stream(s, NULL);
if (!audio_st)
return AVERROR(ENOMEM);
audio_st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
@@ -166,7 +164,7 @@ static int mxg_read_packet(AVFormatContext *s, AVPacket *pkt)
}
pkt->pts = pkt->dts = mxg->dts;
- pkt->stream_index = VIDEO_STREAM_INDEX;
+ pkt->stream_index = 0;
pkt->destruct = NULL;
pkt->size = mxg->buffer_ptr - mxg->soi_ptr;
pkt->data = mxg->soi_ptr;
@@ -204,7 +202,7 @@ static int mxg_read_packet(AVFormatContext *s, AVPacket *pkt)
if (marker == APP13 && size >= 16) { /* audio data */
/* time (GMT) of first sample in usec since 1970, little-endian */
pkt->pts = pkt->dts = AV_RL64(startmarker_ptr + 8);
- pkt->stream_index = AUDIO_STREAM_INDEX;
+ pkt->stream_index = 1;
pkt->destruct = NULL;
pkt->size = size - 14;
pkt->data = startmarker_ptr + 16;
OpenPOWER on IntegriCloud