summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-24 02:08:21 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-24 03:32:24 +0100
commit8e576d58306df95d6373dd0ca2c1f21f1afaeca9 (patch)
tree5f7b9c8783b342e80e32b58b94ded819eb414b3c /libavformat
parent7ffa9ea05aa951b6b13e615f1bd3b8280f758561 (diff)
parentbbb46f3ec7128d8a624f2aa5b4f99ec44c0b9567 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: libavutil: add utility functions to simplify allocation of audio buffers. libavutil: add planar sample formats and av_sample_fmt_is_planar() avconv: fix segfault at EOF with delayed pictures pcmdec: remove unneeded resetting of samples pointer avconv: remove a now unused parameter from output_packet(). avconv: formatting fixes in output_packet() avconv: declare some variables in blocks where they are used avconv: use the same behavior when decoding audio/video/subs bethsoftvideo: return proper consumed size for palette packets. cdg: skip packets that don't contain a cdg command. crcenc: add flags avconv: use vsync 0 for AVFMT_NOTIMESTAMPS formats. tiffenc: add a private option for selecting compression algorithm md5enc: add flags ARM: remove needless .text/.align directives Conflicts: doc/APIchanges libavcodec/tiffenc.c libavutil/avutil.h libavutil/samplefmt.c libavutil/samplefmt.h tests/ref/fate/bethsoft-vid tests/ref/fate/cdgraphics tests/ref/fate/film-cvid-pcm-stereo-8bit tests/ref/fate/mpeg2-field-enc tests/ref/fate/nuv tests/ref/fate/tiertex-seq tests/ref/fate/tscc-32bit tests/ref/fate/vmnc-32bit Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/cdg.c9
-rw-r--r--libavformat/crcenc.c1
-rw-r--r--libavformat/framecrcenc.c1
-rw-r--r--libavformat/md5enc.c2
4 files changed, 12 insertions, 1 deletions
diff --git a/libavformat/cdg.c b/libavformat/cdg.c
index 75f1fb24c9..444c1fa27a 100644
--- a/libavformat/cdg.c
+++ b/libavformat/cdg.c
@@ -22,6 +22,8 @@
#include "avformat.h"
#define CDG_PACKET_SIZE 24
+#define CDG_COMMAND 0x09
+#define CDG_MASK 0x3F
static int read_header(AVFormatContext *s, AVFormatParameters *ap)
{
@@ -49,7 +51,12 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
{
int ret;
- ret = av_get_packet(s->pb, pkt, CDG_PACKET_SIZE);
+ while (1) {
+ ret = av_get_packet(s->pb, pkt, CDG_PACKET_SIZE);
+ if (ret < 1 || (pkt->data[0] & CDG_MASK) == CDG_COMMAND)
+ break;
+ av_free_packet(pkt);
+ }
pkt->stream_index = 0;
pkt->dts=pkt->pts= s->streams[0]->cur_dts;
diff --git a/libavformat/crcenc.c b/libavformat/crcenc.c
index f596e665d1..d0ca8352d9 100644
--- a/libavformat/crcenc.c
+++ b/libavformat/crcenc.c
@@ -64,4 +64,5 @@ AVOutputFormat ff_crc_muxer = {
.write_header = crc_write_header,
.write_packet = crc_write_packet,
.write_trailer = crc_write_trailer,
+ .flags = AVFMT_NOTIMESTAMPS,
};
diff --git a/libavformat/framecrcenc.c b/libavformat/framecrcenc.c
index 65ca670bbd..5798560cbe 100644
--- a/libavformat/framecrcenc.c
+++ b/libavformat/framecrcenc.c
@@ -40,4 +40,5 @@ AVOutputFormat ff_framecrc_muxer = {
.audio_codec = CODEC_ID_PCM_S16LE,
.video_codec = CODEC_ID_RAWVIDEO,
.write_packet = framecrc_write_packet,
+ .flags = AVFMT_VARIABLE_FPS,
};
diff --git a/libavformat/md5enc.c b/libavformat/md5enc.c
index 512e082778..c18d6e4cbd 100644
--- a/libavformat/md5enc.c
+++ b/libavformat/md5enc.c
@@ -75,6 +75,7 @@ AVOutputFormat ff_md5_muxer = {
.write_header = write_header,
.write_packet = write_packet,
.write_trailer = write_trailer,
+ .flags = AVFMT_NOTIMESTAMPS,
};
#endif
@@ -102,5 +103,6 @@ AVOutputFormat ff_framemd5_muxer = {
.audio_codec = CODEC_ID_PCM_S16LE,
.video_codec = CODEC_ID_RAWVIDEO,
.write_packet = framemd5_write_packet,
+ .flags = AVFMT_VARIABLE_FPS,
};
#endif