aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-07-06 23:57:11 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-07-06 23:57:11 +0200
commitc3b6cc61e502b8df0d5bc6b9058dfc482a08d42a (patch)
treea03500dd560ac0aceadc3dbb485631a315ad89bf /libavformat
parent4e59c8ecf1433b85b539c5e89bb68cfe8b839866 (diff)
parentf02f745e4aa070e5fabf1156b75c340171304933 (diff)
downloadffmpeg-c3b6cc61e502b8df0d5bc6b9058dfc482a08d42a.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: ffserver: remove unused variable. Remove unused and outdated TODO file. gitignore: Drop individual .d ignore; it is already covered by a wildcard. lavf: deprecate AVStream.quality. bink: pass Bink version to audio decoder through extradata instead of codec_tag. libpostproc: Remove disabled code. flashsv: improve some comments and fix some wrong ones flashsv: Eliminate redundant variable indirection. flashsv: set reference frame type to full frame flashsv: replace bitstream description by a link to the specification flashsv: convert a debug av_log into av_dlog flashsv: simplify condition flashsv: return more meaningful error values flashsv: cosmetics: break some overly long lines flashsv: cosmetics: drop some unnecessary parentheses swscale: amend documentation to mention use of native depth for scaling. eval: add missing comma to tests. eval: fix memleak. H.264: make loopfilter bS const where applicable Conflicts: libavcodec/binkaudio.c libavformat/bink.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avformat.h4
-rw-r--r--libavformat/bink.c9
-rw-r--r--libavformat/ffmdec.c1
-rw-r--r--libavformat/ffmenc.c1
-rw-r--r--libavformat/version.h3
5 files changed, 12 insertions, 6 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 6b0cd4917b..f8eb7f7c9d 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -528,12 +528,14 @@ typedef struct AVStream {
int stream_copy; /**< If set, just copy stream. */
enum AVDiscard discard; ///< Selects which packets can be discarded at will and do not need to be demuxed.
+#if FF_API_AVSTREAM_QUALITY
//FIXME move stuff to a flags field?
/**
* Quality, as it has been removed from AVCodecContext and put in AVVideoFrame.
* MN: dunno if that is the right place for it
*/
- float quality;
+ attribute_deprecated float quality;
+#endif
/**
* Decoding: pts of the first frame of the stream, in stream time base.
diff --git a/libavformat/bink.c b/libavformat/bink.c
index eed52cdb49..34c1a9944f 100644
--- a/libavformat/bink.c
+++ b/libavformat/bink.c
@@ -134,15 +134,18 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
if (!ast)
return AVERROR(ENOMEM);
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
+ ast->codec->codec_tag = 0;
ast->codec->sample_rate = avio_rl16(pb);
av_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
flags = avio_rl16(pb);
ast->codec->codec_id = flags & BINK_AUD_USEDCT ?
CODEC_ID_BINKAUDIO_DCT : CODEC_ID_BINKAUDIO_RDFT;
ast->codec->channels = flags & BINK_AUD_STEREO ? 2 : 1;
- ast->codec->extradata = av_mallocz(1 + FF_INPUT_BUFFER_PADDING_SIZE);
- ast->codec->extradata_size = 1;
- ast->codec->extradata[0] = vst->codec->codec_tag == MKTAG('B','I','K','b');
+ ast->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!ast->codec->extradata)
+ return AVERROR(ENOMEM);
+ ast->codec->extradata_size = 4;
+ AV_WL32(ast->codec->extradata, vst->codec->codec_tag);
}
for (i = 0; i < bink->num_audio_tracks; i++)
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index f0832659d5..d4821da47f 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -301,7 +301,6 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
codec->codec_id = avio_rb32(pb);
codec->codec_type = avio_r8(pb); /* codec_type */
codec->bit_rate = avio_rb32(pb);
- st->quality = avio_rb32(pb);
codec->flags = avio_rb32(pb);
codec->flags2 = avio_rb32(pb);
codec->debug = avio_rb32(pb);
diff --git a/libavformat/ffmenc.c b/libavformat/ffmenc.c
index b3285b5c63..595ba88223 100644
--- a/libavformat/ffmenc.c
+++ b/libavformat/ffmenc.c
@@ -114,7 +114,6 @@ static int ffm_write_header(AVFormatContext *s)
avio_wb32(pb, codec->codec_id);
avio_w8(pb, codec->codec_type);
avio_wb32(pb, codec->bit_rate);
- avio_wb32(pb, st->quality);
avio_wb32(pb, codec->flags);
avio_wb32(pb, codec->flags2);
avio_wb32(pb, codec->debug);
diff --git a/libavformat/version.h b/libavformat/version.h
index d358285e3c..9aaf395170 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -77,5 +77,8 @@
#ifndef FF_API_FLAG_RTP_HINT
#define FF_API_FLAG_RTP_HINT (LIBAVFORMAT_VERSION_MAJOR < 54)
#endif
+#ifndef FF_API_AVSTREAM_QUALITY
+#define FF_API_AVSTREAM_QUALITY (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
#endif /* AVFORMAT_VERSION_H */