diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-19 23:40:03 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-20 00:03:19 +0100 |
commit | 479fb7b8afcf0711b93b48c7d634e9f464d8b336 (patch) | |
tree | 53f46f6c9f02c4e8b8d9ad1a86f27078e520dc2f /libavformat | |
parent | 87c1783c77f4e688edceec165eaef287bd127622 (diff) | |
parent | 18ba94c6f9e08fc71cb5c4944bc6e4e1196e4634 (diff) | |
download | ffmpeg-479fb7b8afcf0711b93b48c7d634e9f464d8b336.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master: (35 commits)
fix space type in Changelog
ZeroCodec Decoder
RealAudio Lossless decoder
rtpenc: Use AVFormatContext.packet_size instead of a private option
url: Document the expected behaviour of url_read
libavformat: Use AVFormatContext.probesize in init_input
docs: Fix a stray reference to tags in the generic doxy on dicts
cosmetics: Align some AVInput/OutputFormat declarations
zmbv: check decompress result
zmbv: correct indentation
adpcm: convert adpcm_thp to bytestream2.
adpcm: convert adpcm_yamaha to bytestream2.
adpcm: convert adpcm_swf to bytestream2.
adpcm: convert adpcm_sbpro to bytestream2.
adpcm: convert adpcm_ct to bytestream2.
adpcm: convert adpcm_ima_amv/smjpeg to bytestream2.
adpcm: convert adpcm_ea_xas to bytestream2.
adpcm: convert adpcm_ea_r1/2/3 to bytestream2.
adpcm: convert ea_maxis_xa to bytestream2.
adpcm: convert adpcm_ea to bytestream2.
...
Conflicts:
Changelog
libavcodec/Makefile
libavcodec/adpcm.c
libavcodec/allcodecs.c
libavcodec/avcodec.h
libavcodec/version.h
libavcodec/zerocodec.c
libavcodec/zmbv.c
libavformat/riff.c
libavformat/url.h
tests/ref/fate/truemotion1-15
tests/ref/fate/truemotion1-24
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rm.c | 1 | ||||
-rw-r--r-- | libavformat/rmdec.c | 9 | ||||
-rw-r--r-- | libavformat/rtpenc.c | 17 | ||||
-rw-r--r-- | libavformat/rtpenc.h | 1 | ||||
-rw-r--r-- | libavformat/rtsp.c | 6 | ||||
-rw-r--r-- | libavformat/rtspdec.c | 8 | ||||
-rw-r--r-- | libavformat/rtspenc.c | 4 | ||||
-rw-r--r-- | libavformat/url.h | 2 | ||||
-rw-r--r-- | libavformat/utils.c | 4 |
9 files changed, 30 insertions, 22 deletions
diff --git a/libavformat/rm.c b/libavformat/rm.c index f2942964d4..769a83f134 100644 --- a/libavformat/rm.c +++ b/libavformat/rm.c @@ -42,5 +42,6 @@ const AVCodecTag ff_rm_codec_tags[] = { { CODEC_ID_SIPR, MKTAG('s','i','p','r') }, { CODEC_ID_AAC, MKTAG('r','a','a','c') }, { CODEC_ID_AAC, MKTAG('r','a','c','p') }, + { CODEC_ID_RALF, MKTAG('L','S','D',':') }, { CODEC_ID_NONE }, }; diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 5fb43106c8..bd83956c12 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -311,6 +311,15 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb, /* ra type header */ if (rm_read_audio_stream_info(s, pb, st, rst, 0)) return -1; + } else if (v == MKBETAG('L', 'S', 'D', ':')) { + avio_seek(pb, -4, SEEK_CUR); + if ((ret = rm_read_extradata(pb, st->codec, codec_data_size)) < 0) + return ret; + + st->codec->codec_type = AVMEDIA_TYPE_AUDIO; + st->codec->codec_tag = AV_RL32(st->codec->extradata); + st->codec->codec_id = ff_codec_get_id(ff_rm_codec_tags, + st->codec->codec_tag); } else { int fps; if (avio_rl32(pb) != MKTAG('V', 'I', 'D', 'O')) { diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index 6c1029b19c..49da08b4e1 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -33,7 +33,6 @@ static const AVOption options[] = { FF_RTP_FLAG_OPTS(RTPMuxContext, flags) { "payload_type", "Specify RTP payload type", offsetof(RTPMuxContext, payload_type), AV_OPT_TYPE_INT, {.dbl = -1 }, -1, 127, AV_OPT_FLAG_ENCODING_PARAM }, - { "max_packet_size", "Max packet size", offsetof(RTPMuxContext, max_packet_size), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, { NULL }, }; @@ -110,21 +109,21 @@ static int rtp_write_header(AVFormatContext *s1) s->first_rtcp_ntp_time = (s1->start_time_realtime / 1000) * 1000 + NTP_OFFSET_US; - if (s->max_packet_size) { + if (s1->packet_size) { if (s1->pb->max_packet_size) - s->max_packet_size = FFMIN(s->max_packet_size, - s1->pb->max_packet_size); + s1->packet_size = FFMIN(s1->packet_size, + s1->pb->max_packet_size); } else - s->max_packet_size = s1->pb->max_packet_size; - if (s->max_packet_size <= 12) { - av_log(s1, AV_LOG_ERROR, "Max packet size %d too low\n", s->max_packet_size); + s1->packet_size = s1->pb->max_packet_size; + if (s1->packet_size <= 12) { + av_log(s1, AV_LOG_ERROR, "Max packet size %d too low\n", s1->packet_size); return AVERROR(EIO); } - s->buf = av_malloc(s->max_packet_size); + s->buf = av_malloc(s1->packet_size); if (s->buf == NULL) { return AVERROR(ENOMEM); } - s->max_payload_size = s->max_packet_size - 12; + s->max_payload_size = s1->packet_size - 12; s->max_frames_per_packet = 0; if (s1->max_delay) { diff --git a/libavformat/rtpenc.h b/libavformat/rtpenc.h index 080bf2154d..b7e49b0d31 100644 --- a/libavformat/rtpenc.h +++ b/libavformat/rtpenc.h @@ -34,7 +34,6 @@ struct RTPMuxContext { uint32_t timestamp; uint32_t base_timestamp; uint32_t cur_timestamp; - int max_packet_size; int max_payload_size; int num_frames; diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index b28fb519cb..dd3f9226db 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1924,7 +1924,7 @@ AVInputFormat ff_sdp_demuxer = { .read_header = sdp_read_header, .read_packet = ff_rtsp_fetch_packet, .read_close = sdp_read_close, - .priv_class = &sdp_demuxer_class + .priv_class = &sdp_demuxer_class, }; #endif /* CONFIG_SDP_DEMUXER */ @@ -2042,7 +2042,7 @@ AVInputFormat ff_rtp_demuxer = { .read_header = rtp_read_header, .read_packet = ff_rtsp_fetch_packet, .read_close = sdp_read_close, - .flags = AVFMT_NOFILE, - .priv_class = &rtp_demuxer_class + .flags = AVFMT_NOFILE, + .priv_class = &rtp_demuxer_class, }; #endif /* CONFIG_RTP_DEMUXER */ diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index 15005bb9be..ea2d517e3c 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -409,8 +409,8 @@ AVInputFormat ff_rtsp_demuxer = { .read_packet = rtsp_read_packet, .read_close = rtsp_read_close, .read_seek = rtsp_read_seek, - .flags = AVFMT_NOFILE, - .read_play = rtsp_read_play, - .read_pause = rtsp_read_pause, - .priv_class = &rtsp_demuxer_class, + .flags = AVFMT_NOFILE, + .read_play = rtsp_read_play, + .read_pause = rtsp_read_pause, + .priv_class = &rtsp_demuxer_class, }; diff --git a/libavformat/rtspenc.c b/libavformat/rtspenc.c index f3c846a5fb..58cd8070d6 100644 --- a/libavformat/rtspenc.c +++ b/libavformat/rtspenc.c @@ -242,6 +242,6 @@ AVOutputFormat ff_rtsp_muxer = { .write_header = rtsp_write_header, .write_packet = rtsp_write_packet, .write_trailer = rtsp_write_close, - .flags = AVFMT_NOFILE | AVFMT_GLOBALHEADER, - .priv_class = &rtsp_muxer_class, + .flags = AVFMT_NOFILE | AVFMT_GLOBALHEADER, + .priv_class = &rtsp_muxer_class, }; diff --git a/libavformat/url.h b/libavformat/url.h index b3eafa63c7..dc483a3ea9 100644 --- a/libavformat/url.h +++ b/libavformat/url.h @@ -63,7 +63,7 @@ typedef struct URLProtocol { /** * Read data from the protocol. * If data is immediately available (even less than size), EOF is - * reached or an error occurs (including EINTR), return immediately, + * reached or an error occurs (including EINTR), return immediately. * Otherwise: * In non-blocking mode, return AVERROR(EAGAIN) immediately. * In blocking mode, wait for data/EOF/error with a short timeout (0.1s), diff --git a/libavformat/utils.c b/libavformat/utils.c index a917b4269d..fd973a8330 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -532,7 +532,7 @@ static int init_input(AVFormatContext *s, const char *filename, AVDictionary **o if (s->pb) { s->flags |= AVFMT_FLAG_CUSTOM_IO; if (!s->iformat) - return av_probe_input_buffer(s->pb, &s->iformat, filename, s, 0, 0); + return av_probe_input_buffer(s->pb, &s->iformat, filename, s, 0, s->probesize); else if (s->iformat->flags & AVFMT_NOFILE) av_log(s, AV_LOG_WARNING, "Custom AVIOContext makes no sense and " "will be ignored with AVFMT_NOFILE format.\n"); @@ -548,7 +548,7 @@ static int init_input(AVFormatContext *s, const char *filename, AVDictionary **o return ret; if (s->iformat) return 0; - return av_probe_input_buffer(s->pb, &s->iformat, filename, s, 0, 0); + return av_probe_input_buffer(s->pb, &s->iformat, filename, s, 0, s->probesize); } static AVPacket *add_to_pktbuf(AVPacketList **packet_buffer, AVPacket *pkt, |