summaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-19 18:38:10 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-19 18:38:10 +0200
commit999a99c865cc12cc69240029b8a280b5ba170b52 (patch)
tree76716c81c74a7cac82b4a265b4f6c18b4ce2191f /libavformat
parente3c1d9a56c715223284d5bfbcad5cd1f78a798f9 (diff)
parenta312f71090ee620ee252f2034aef6b13e2dafe9c (diff)
downloadffmpeg-streaming-999a99c865cc12cc69240029b8a280b5ba170b52.zip
ffmpeg-streaming-999a99c865cc12cc69240029b8a280b5ba170b52.tar.gz
Merge commit 'a312f71090ee620ee252f2034aef6b13e2dafe9c'
* commit 'a312f71090ee620ee252f2034aef6b13e2dafe9c': lavf: deprecate now unused AVStream.pts Conflicts: libavformat/mux.c libavformat/version.h mostly not merged as the code is needed for a/vsync drop handling and what the code does is what is needed, it could maybe be moved elsewhere or factored somehow but simply removing it would be droping these features. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avformat.h7
-rw-r--r--libavformat/mux.c5
-rw-r--r--libavformat/version.h5
3 files changed, 12 insertions, 5 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 358ce00..09870d1 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -368,6 +368,7 @@ int av_get_packet(AVIOContext *s, AVPacket *pkt, int size);
*/
int av_append_packet(AVIOContext *s, AVPacket *pkt, int size);
+#if FF_API_LAVF_FRAC
/*************************************************/
/* fractional numbers for exact pts handling */
@@ -378,6 +379,7 @@ int av_append_packet(AVIOContext *s, AVPacket *pkt, int size);
typedef struct AVFrac {
int64_t val, num, den;
} AVFrac;
+#endif
/*************************************************/
/* input/output formats */
@@ -785,10 +787,13 @@ typedef struct AVStream {
AVCodecContext *codec;
void *priv_data;
+#if FF_API_LAVF_FRAC
/**
- * encoding: pts generation when outputting stream
+ * @deprecated this field is unused
*/
+ attribute_deprecated
struct AVFrac pts;
+#endif
/**
* This is the fundamental unit of time (in seconds) in terms
diff --git a/libavformat/mux.c b/libavformat/mux.c
index a3a63f2..1d8fedc 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -435,7 +435,8 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options)
static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt)
{
int delay = FFMAX(st->codec->has_b_frames, st->codec->max_b_frames > 0);
- int num, den, frame_size, i;
+ int num, den, i;
+ int frame_size;
av_dlog(s, "compute_pkt_fields2: pts:%s dts:%s cur_dts:%s b:%d size:%d st:%d\n",
av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts), delay, pkt->size, pkt->stream_index);
@@ -516,8 +517,6 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt)
case AVMEDIA_TYPE_VIDEO:
frac_add(&st->pts, (int64_t)st->time_base.den * st->codec->time_base.num);
break;
- default:
- break;
}
return 0;
}
diff --git a/libavformat/version.h b/libavformat/version.h
index c6667ca..5bc0898 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,7 +31,7 @@
#define LIBAVFORMAT_VERSION_MAJOR 55
#define LIBAVFORMAT_VERSION_MINOR 38
-#define LIBAVFORMAT_VERSION_MICRO 100
+#define LIBAVFORMAT_VERSION_MICRO 101
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
@@ -54,6 +54,9 @@
#ifndef FF_API_LAVF_BITEXACT
#define FF_API_LAVF_BITEXACT (LIBAVFORMAT_VERSION_MAJOR < 56)
#endif
+#ifndef FF_API_LAVF_FRAC
+#define FF_API_LAVF_FRAC (LIBAVFORMAT_VERSION_MAJOR < 57)
+#endif
#ifndef FF_API_ALLOC_OUTPUT_CONTEXT
#define FF_API_ALLOC_OUTPUT_CONTEXT (LIBAVFORMAT_VERSION_MAJOR < 56)
OpenPOWER on IntegriCloud