-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathffmpeg-4.4-add-accessors-for-AVStream.patch
40 lines (39 loc) · 1.21 KB
/
ffmpeg-4.4-add-accessors-for-AVStream.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff -up ffmpeg-5.1/libavformat/avformat.h ffmpeg-5.1/libavformat/avformat.h
--- ffmpeg-5.1/libavformat/avformat.h 2022-07-22 19:58:39.000000000 +0200
+++ ffmpeg-5.1/libavformat/avformat.h 2022-08-09 16:22:27.150058854 +0200
@@ -2904,4 +2904,9 @@ AVRational av_stream_get_codec_timebase(
* @}
*/
+
+int64_t av_stream_get_cur_dts(AVStream *s);
+int64_t av_stream_get_first_dts(AVStream *s);
+int av_stream_get_pts_wrap_bits(AVStream *s);
+int64_t av_stream_get_codec_info_nb_frames(AVStream *s);
#endif /* AVFORMAT_AVFORMAT_H */
diff -up ffmpeg-5.1/libavformat/utils.c ffmpeg-5.1/libavformat/utils.c
--- ffmpeg-5.1/libavformat/utils.c 2022-08-09 16:22:27.150058854 +0200
+++ ffmpeg-5.1/libavformat/utils.c 2022-08-09 16:23:07.479034213 +0200
@@ -602,3 +602,23 @@ int ff_bprint_to_codecpar_extradata(AVCo
par->extradata_size = buf->len;
return 0;
}
+
+int64_t av_stream_get_cur_dts(AVStream *s)
+{
+ return ffstream(s)->cur_dts;
+}
+
+int64_t av_stream_get_first_dts(AVStream *s)
+{
+ return ffstream(s)->first_dts;
+}
+
+int av_stream_get_pts_wrap_bits(AVStream *s)
+{
+ return s->pts_wrap_bits;
+}
+
+int64_t av_stream_get_codec_info_nb_frames(AVStream *s)
+{
+ return ffstream(s)->codec_info_nb_frames;
+}