Commit 4e92e6c3 authored by michael's avatar michael

dont be too picky about timestampsbeing wrong if the destination container is...

dont be too picky about timestampsbeing wrong if the destination container is without timestamps and raw of the raw video / raw audio sort


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5961 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2767285e
......@@ -122,6 +122,7 @@ typedef struct AVFormatParameters {
#define AVFMT_RAWPICTURE 0x0020 /* format wants AVPicture structure for
raw picture data */
#define AVFMT_GLOBALHEADER 0x0040 /* format wants global header */
#define AVFMT_NOTIMESTAMPS 0x0080 /* format doesnt need / has any timestamps */
typedef struct AVOutputFormat {
const char *name;
......
......@@ -423,6 +423,7 @@ AVOutputFormat flac_muxer = {
flac_write_header,
raw_write_packet,
raw_write_trailer,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
......@@ -449,6 +450,7 @@ AVOutputFormat ac3_muxer = {
raw_write_header,
raw_write_packet,
raw_write_trailer,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
......@@ -498,6 +500,7 @@ AVOutputFormat h261_muxer = {
raw_write_header,
raw_write_packet,
raw_write_trailer,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
......@@ -525,6 +528,7 @@ AVOutputFormat h263_muxer = {
raw_write_header,
raw_write_packet,
raw_write_trailer,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
......@@ -552,6 +556,7 @@ AVOutputFormat m4v_muxer = {
raw_write_header,
raw_write_packet,
raw_write_trailer,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
......@@ -579,6 +584,7 @@ AVOutputFormat h264_muxer = {
raw_write_header,
raw_write_packet,
raw_write_trailer,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
......@@ -605,6 +611,7 @@ AVOutputFormat mpeg1video_muxer = {
raw_write_header,
raw_write_packet,
raw_write_trailer,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
......@@ -620,6 +627,7 @@ AVOutputFormat mpeg2video_muxer = {
raw_write_header,
raw_write_packet,
raw_write_trailer,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
......@@ -659,6 +667,7 @@ AVOutputFormat mjpeg_muxer = {
raw_write_header,
raw_write_packet,
raw_write_trailer,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
......@@ -690,6 +699,7 @@ AVOutputFormat pcm_ ## name ## _muxer = {\
raw_write_header,\
raw_write_packet,\
raw_write_trailer,\
.flags= AVFMT_NOTIMESTAMPS,\
};
......@@ -786,6 +796,7 @@ AVOutputFormat rawvideo_muxer = {
raw_write_header,
raw_write_packet,
raw_write_trailer,
.flags= AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
......@@ -810,6 +821,6 @@ AVOutputFormat null_muxer = {
raw_write_header,
null_write_packet,
raw_write_trailer,
.flags = AVFMT_NOFILE | AVFMT_RAWPICTURE,
.flags = AVFMT_NOFILE | AVFMT_RAWPICTURE | AVFMT_NOTIMESTAMPS,
};
#endif //CONFIG_MUXERS
......@@ -2402,7 +2402,7 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt)
int ret;
ret=compute_pkt_fields2(s->streams[pkt->stream_index], pkt);
if(ret<0)
if(ret<0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
return ret;
truncate_ts(s->streams[pkt->stream_index], pkt);
......@@ -2509,7 +2509,7 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt){
return 0;
//av_log(NULL, AV_LOG_DEBUG, "av_interleaved_write_frame %d %Ld %Ld\n", pkt->size, pkt->dts, pkt->pts);
if(compute_pkt_fields2(st, pkt) < 0)
if(compute_pkt_fields2(st, pkt) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
return -1;
if(pkt->dts == AV_NOPTS_VALUE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment