aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-05 02:03:12 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-05 02:03:12 +0100
commit7f83db312454b3673a4dfd34745428f61309ab30 (patch)
tree27c92b052b83e4b3bf95a33fbe6979aaa00f8184 /libavformat
parentc4eec85a1fa768025f88261995af08f1dba9685d (diff)
parentfeb15cee5e19a1e31d075ec08d598d64c2dc38ef (diff)
downloadffmpeg-7f83db312454b3673a4dfd34745428f61309ab30.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: (46 commits) mtv: Make sure audio_subsegments is not 0 v4l2: use V4L2_FMT_FLAG_EMULATED only if it is defined avconv: add symbolic names for -vsync parameters flvdec: Fix compiler warning for uninitialized variables rtsp: Fix compiler warning for uninitialized variable ulti: convert to new bytestream API. swscale: Use standard multiple inclusion guards in ppc/ header files. Place some START_TIMER invocations in separate blocks. v4l2: list available formats v4l2: set the proper codec_tag v4l2: refactor device_open v4l2: simplify away io_method v4l2: cosmetics v4l2: uniform and format options v4l2: do not force interlaced mode avio: exit early in fill_buffer without read_packet vc1dec: fix invalid memory access for small video dimensions rv34: fix invalid memory access for small video dimensions rv34: joint coefficient decoding and dequantization avplay: Don't call avio_set_interrupt_cb(NULL) ... Conflicts: Changelog avconv.c doc/APIchanges doc/indevs.texi libavcodec/adxenc.c libavcodec/dnxhdenc.c libavcodec/h264.c libavdevice/v4l2.c libavformat/flvdec.c libavformat/mtv.c libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/Makefile1
-rw-r--r--libavformat/adxdec.c1
-rw-r--r--libavformat/allformats.c2
-rw-r--r--libavformat/aviobuf.c4
-rw-r--r--libavformat/mtv.c8
-rw-r--r--libavformat/rawenc.c12
6 files changed, 24 insertions, 4 deletions
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 877a86cac9..1afaddca1e 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -26,6 +26,7 @@ OBJS-$(CONFIG_AC3_MUXER) += rawenc.o
OBJS-$(CONFIG_ACT_DEMUXER) += act.o
OBJS-$(CONFIG_ADF_DEMUXER) += bintext.o sauce.o
OBJS-$(CONFIG_ADX_DEMUXER) += adxdec.o
+OBJS-$(CONFIG_ADX_MUXER) += rawenc.o
OBJS-$(CONFIG_ADTS_MUXER) += adtsenc.o
OBJS-$(CONFIG_AEA_DEMUXER) += aea.o pcm.o
OBJS-$(CONFIG_AIFF_DEMUXER) += aiffdec.o riff.o pcm.o isom.o
diff --git a/libavformat/adxdec.c b/libavformat/adxdec.c
index dca9748301..ab11d832d8 100644
--- a/libavformat/adxdec.c
+++ b/libavformat/adxdec.c
@@ -109,4 +109,5 @@ AVInputFormat ff_adx_demuxer = {
.read_packet = adx_read_packet,
.extensions = "adx",
.value = CODEC_ID_ADPCM_ADX,
+ .flags = AVFMT_GENERIC_INDEX,
};
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 615ae574d0..d8ca0d50ea 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -54,7 +54,7 @@ void av_register_all(void)
REGISTER_DEMUXER (ACT, act);
REGISTER_DEMUXER (ADF, adf);
REGISTER_MUXER (ADTS, adts);
- REGISTER_DEMUXER (ADX, adx);
+ REGISTER_MUXDEMUX (ADX, adx);
REGISTER_DEMUXER (AEA, aea);
REGISTER_MUXDEMUX (AIFF, aiff);
REGISTER_MUXDEMUX (AMR, amr);
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index d9d012ee90..cac6b1f5eb 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -574,6 +574,10 @@ static void fill_buffer(AVIOContext *s)
int len= s->buffer_size - (dst - s->buffer);
int max_buffer_size = s->max_packet_size ? s->max_packet_size : IO_BUFFER_SIZE;
+ /* can't fill the buffer without read_packet, just set EOF if appropiate */
+ if (!s->read_packet && s->buf_ptr >= s->buf_end)
+ s->eof_reached = 1;
+
/* no need to do anything if EOF already reached */
if (s->eof_reached)
return;
diff --git a/libavformat/mtv.c b/libavformat/mtv.c
index 4252309a6e..b4b06d96cd 100644
--- a/libavformat/mtv.c
+++ b/libavformat/mtv.c
@@ -112,10 +112,12 @@ static int mtv_read_header(AVFormatContext *s, AVFormatParameters *ap)
avio_skip(pb, 4);
audio_subsegments = avio_rl16(pb);
- if(!audio_subsegments){
- av_log(s, AV_LOG_ERROR, "audio_subsegments is 0\n");
- return AVERROR(EINVAL);
+
+ if (audio_subsegments == 0) {
+ av_log_ask_for_sample(s, "MTV files without audio are not supported\n");
+ return AVERROR_INVALIDDATA;
}
+
mtv->full_segment_size =
audio_subsegments * (MTV_AUDIO_PADDING_SIZE + MTV_ASUBCHUNK_DATA_SIZE) +
mtv->img_segment_size;
diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c
index b2ff79abf3..4c1ede4928 100644
--- a/libavformat/rawenc.c
+++ b/libavformat/rawenc.c
@@ -45,6 +45,18 @@ AVOutputFormat ff_ac3_muxer = {
};
#endif
+#if CONFIG_ADX_MUXER
+AVOutputFormat ff_adx_muxer = {
+ .name = "adx",
+ .long_name = NULL_IF_CONFIG_SMALL("CRI ADX"),
+ .extensions = "adx",
+ .audio_codec = CODEC_ID_ADPCM_ADX,
+ .video_codec = CODEC_ID_NONE,
+ .write_packet = ff_raw_write_packet,
+ .flags = AVFMT_NOTIMESTAMPS,
+};
+#endif
+
#if CONFIG_DIRAC_MUXER
AVOutputFormat ff_dirac_muxer = {
.name = "dirac",