diff options
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/cdg.c | 9 | ||||
-rw-r--r-- | libavformat/crcenc.c | 1 | ||||
-rw-r--r-- | libavformat/framecrcenc.c | 1 | ||||
-rw-r--r-- | libavformat/md5enc.c | 2 |
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 |