[FFmpeg-cvslog] libavutil/timer: Fix clang reserved-user-defined-literal

2021-03-13 Thread Christopher Degawa
ffmpeg | branch: master | Christopher Degawa  | Fri Mar 12 
22:20:37 2021 -0600| [e93403b75f5f8ada918d928163fe2ea8679557d5] | committer: 
James Almer

libavutil/timer: Fix clang reserved-user-defined-literal

clang errors when compiling with C++11 about needing spaces between
literal and identifier

Signed-off-by: Christopher Degawa 
Signed-off-by: James Almer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e93403b75f5f8ada918d928163fe2ea8679557d5
---

 libavutil/timer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/timer.h b/libavutil/timer.h
index 0bb353cfce..36f920e96a 100644
--- a/libavutil/timer.h
+++ b/libavutil/timer.h
@@ -87,7 +87,7 @@
 if (((tcount + tskip_count) & (tcount + tskip_count - 1)) == 0) { \
 int i;\
 av_log(NULL, AV_LOG_ERROR,\
-   "%7"PRIu64" " FF_TIMER_UNITS " in %s,%8d runs,%7d skips",   
   \
+   "%7" PRIu64 " " FF_TIMER_UNITS " in %s,%8d runs,%7d skips",\
tsum * 10 / tcount, id, tcount, tskip_count);  \
 for (i = 0; i < 32; i++)  \
 av_log(NULL, AV_LOG_VERBOSE, " %2d", 
av_log2(2*thistogram[i]));\

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avformat/librist: rework librist_read

2021-03-13 Thread Marton Balint
ffmpeg | branch: master | Marton Balint  | Sat Mar  6 21:48:57 
2021 +0100| [4b1e387e259ab0d6e7c4f7f010736b64938c4939] | committer: Marton 
Balint

avformat/librist: rework librist_read

Queue tracking makes no difference so remove it, return EAGAIN of no data is
available and rist data block needs to be freed even for zero sized packets.

Signed-off-by: Marton Balint 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4b1e387e259ab0d6e7c4f7f010736b64938c4939
---

 libavformat/librist.c | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/libavformat/librist.c b/libavformat/librist.c
index 789cefda36..c4ba1192e9 100644
--- a/libavformat/librist.c
+++ b/libavformat/librist.c
@@ -37,7 +37,6 @@
 typedef struct RISTContext {
 const AVClass *class;
 
-int queue_count;
 int profile;
 int buffer_size;
 int log_level;
@@ -184,16 +183,19 @@ static int librist_read(URLContext *h, uint8_t *buf, int 
size)
 const struct rist_data_block *data_block;
 int ret;
 
-ret = rist_receiver_data_read(s->ctx, &data_block, s->queue_count <= 0 ? 
POLLING_TIME : 0);
+ret = rist_receiver_data_read(s->ctx, &data_block, POLLING_TIME);
 if (ret < 0)
 return risterr2ret(ret);
 
-if (ret == 0 || data_block->payload_len <= 0)
-return 0;
+if (ret == 0)
+return AVERROR(EAGAIN);
 
-s->queue_count = ret - 1;
-size = data_block->payload_len;
+if (data_block->payload_len > 9968) {
+rist_receiver_data_block_free((struct rist_data_block**)&data_block);
+return AVERROR_EXTERNAL;
+}
 
+size = data_block->payload_len;
 memcpy(buf, data_block->payload, size);
 rist_receiver_data_block_free((struct rist_data_block**)&data_block);
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] libavformat: add librist protocol

2021-03-13 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Sun Feb 28 20:56:55 
2021 +0100| [4098f809d605fc540870883a9f91880e13ce1d6b] | committer: Marton 
Balint

libavformat: add librist protocol

This work is sponsored by Open Broadcast Systems.

Signed-off-by: Paul B Mahol 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4098f809d605fc540870883a9f91880e13ce1d6b
---

 configure   |   5 +
 doc/protocols.texi  |  29 ++
 libavformat/Makefile|   1 +
 libavformat/librist.c   | 236 
 libavformat/protocols.c |   1 +
 5 files changed, 272 insertions(+)

diff --git a/configure b/configure
index 13f8e0580b..f0ac719d2d 100755
--- a/configure
+++ b/configure
@@ -259,6 +259,7 @@ External library support:
   --enable-libpulseenable Pulseaudio input via libpulse [no]
   --enable-librabbitmq enable RabbitMQ library [no]
   --enable-librav1eenable AV1 encoding via rav1e [no]
+  --enable-librist enable RIST via librist [no]
   --enable-librsvg enable SVG rasterization via librsvg [no]
   --enable-librubberband   enable rubberband needed for rubberband filter [no]
   --enable-librtmp enable RTMP[E] support via librtmp [no]
@@ -1797,6 +1798,7 @@ EXTERNAL_LIBRARY_LIST="
 libpulse
 librabbitmq
 librav1e
+librist
 librsvg
 librtmp
 libshine
@@ -3491,6 +3493,8 @@ unix_protocol_select="network"
 # external library protocols
 libamqp_protocol_deps="librabbitmq"
 libamqp_protocol_select="network"
+librist_protocol_deps="librist"
+librist_protocol_select="network"
 librtmp_protocol_deps="librtmp"
 librtmpe_protocol_deps="librtmp"
 librtmps_protocol_deps="librtmp"
@@ -6410,6 +6414,7 @@ enabled libopus   && {
 enabled libpulse  && require_pkg_config libpulse libpulse 
pulse/pulseaudio.h pa_context_new
 enabled librabbitmq   && require_pkg_config librabbitmq "librabbitmq >= 
0.7.1" amqp.h amqp_new_connection
 enabled librav1e  && require_pkg_config librav1e "rav1e >= 0.4.0" 
rav1e.h rav1e_context_new
+enabled librist   && require_pkg_config librist "librist >= 0.2" 
librist/librist.h rist_receiver_create
 enabled librsvg   && require_pkg_config librsvg librsvg-2.0 
librsvg-2.0/librsvg/rsvg.h rsvg_handle_render_cairo
 enabled librtmp   && require_pkg_config librtmp librtmp librtmp/rtmp.h 
RTMP_Socket
 enabled librubberband && require_pkg_config librubberband "rubberband >= 
1.8.1" rubberband/rubberband-c.h rubberband_new -lstdc++ && append 
librubberband_extralibs "-lstdc++"
diff --git a/doc/protocols.texi b/doc/protocols.texi
index 2b2fab8752..4f4a4b4a3a 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -696,6 +696,35 @@ Example usage:
 -f rtp_mpegts -fec prompeg=l=8:d=4 rtp://@var{hostname}:@var{port}
 @end example
 
+@section rist
+
+Reliable Internet Streaming Transport protocol
+
+The accepted options are:
+@table @option
+@item rist_profile
+Supported values:
+@table @samp
+@item simple
+@item main
+This one is default.
+@item advanced
+@end table
+
+@item buffer_size
+Set internal RIST buffer size for retransmission of data.
+
+@item log_level
+Set loglevel for RIST logging messages.
+
+@item secret
+Set override of encryption secret, by default is unset.
+
+@item encryption
+Set encryption type, by default is disabled.
+Acceptable values are 128 and 256.
+@end table
+
 @section rtmp
 
 Real-Time Messaging Protocol.
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 8ce53d5a8c..0f340f74a0 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -657,6 +657,7 @@ OBJS-$(CONFIG_UNIX_PROTOCOL) += unix.o
 
 # external library protocols
 OBJS-$(CONFIG_LIBAMQP_PROTOCOL)  += libamqp.o
+OBJS-$(CONFIG_LIBRIST_PROTOCOL)  += librist.o
 OBJS-$(CONFIG_LIBRTMP_PROTOCOL)  += librtmp.o
 OBJS-$(CONFIG_LIBRTMPE_PROTOCOL) += librtmp.o
 OBJS-$(CONFIG_LIBRTMPS_PROTOCOL) += librtmp.o
diff --git a/libavformat/librist.c b/libavformat/librist.c
new file mode 100644
index 00..789cefda36
--- /dev/null
+++ b/libavformat/librist.c
@@ -0,0 +1,236 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * Reliable Internet Streaming Transport protoc

[FFmpeg-cvslog] avformat/librist: make packet size adjustable for writing, fix it for reading

2021-03-13 Thread Marton Balint
ffmpeg | branch: master | Marton Balint  | Sat Mar  6 22:26:13 
2021 +0100| [deffb5ddce5cc09ec1f29d2255276483d07b7725] | committer: Marton 
Balint

avformat/librist: make packet size adjustable for writing, fix it for reading

Maximum packet size is 1 (RIST_MAX_PACKET_SIZE, which is unfortunately
private) minus the RIST protocol overhead which is 28 bytes for the unencrypted
case, 36 for the encrypted case.

Signed-off-by: Marton Balint 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=deffb5ddce5cc09ec1f29d2255276483d07b7725
---

 doc/protocols.texi|  3 +++
 libavformat/librist.c | 17 -
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/doc/protocols.texi b/doc/protocols.texi
index 4f4a4b4a3a..11005b0849 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -714,6 +714,9 @@ This one is default.
 @item buffer_size
 Set internal RIST buffer size for retransmission of data.
 
+@item pkt_size
+Set maximum packet size for sending data. 1316 by default.
+
 @item log_level
 Set loglevel for RIST logging messages.
 
diff --git a/libavformat/librist.c b/libavformat/librist.c
index c4ba1192e9..3f74521cb4 100644
--- a/libavformat/librist.c
+++ b/libavformat/librist.c
@@ -34,11 +34,15 @@
 
 #include 
 
+// RIST_MAX_PACKET_SIZE - 28 minimum protocol overhead
+#define MAX_PAYLOAD_SIZE (1-28)
+
 typedef struct RISTContext {
 const AVClass *class;
 
 int profile;
 int buffer_size;
+int packet_size;
 int log_level;
 int encryption;
 char *secret;
@@ -59,6 +63,7 @@ static const AVOption librist_options[] = {
 { "main",NULL,  0,   
AV_OPT_TYPE_CONST, {.i64=RIST_PROFILE_MAIN}, 0, 0, .flags = D|E, "profile" 
},
 { "advanced",NULL,  0,   
AV_OPT_TYPE_CONST, {.i64=RIST_PROFILE_ADVANCED}, 0, 0, .flags = D|E, "profile" 
},
 { "buffer_size", "set buffer_size", OFFSET(buffer_size), AV_OPT_TYPE_INT,  
 {.i64=0}, 0, INT_MAX, .flags = D|E },
+{ "pkt_size","set packet size", OFFSET(packet_size), AV_OPT_TYPE_INT,  
 {.i64=1316},  1, MAX_PAYLOAD_SIZE,.flags = D|E },
 { "log_level",   "set loglevel",OFFSET(log_level),   AV_OPT_TYPE_INT,  
 {.i64=-1},   -1, INT_MAX, .flags = D|E },
 { "secret", "set encryption secret",OFFSET(secret),  
AV_OPT_TYPE_STRING,{.str=NULL},  0, 0,   .flags = D|E },
 { "encryption","set encryption type",OFFSET(encryption), AV_OPT_TYPE_INT   
,{.i64=0}, 0, INT_MAX, .flags = D|E },
@@ -123,13 +128,17 @@ static int librist_open(URLContext *h, const char *uri, 
int flags)
 if (ret < 0)
 return risterr2ret(ret);
 
-if (flags & AVIO_FLAG_WRITE)
+if (flags & AVIO_FLAG_WRITE) {
+h->max_packet_size = s->packet_size;
 ret = rist_sender_create(&s->ctx, s->profile, 0, logging_settings);
+}
 if (ret < 0)
 goto err;
 
-if (flags & AVIO_FLAG_READ)
+if (flags & AVIO_FLAG_READ) {
+h->max_packet_size = MAX_PAYLOAD_SIZE;
 ret = rist_receiver_create(&s->ctx, s->profile, logging_settings);
+}
 if (ret < 0)
 goto err;
 
@@ -167,8 +176,6 @@ static int librist_open(URLContext *h, const char *uri, int 
flags)
 if (ret < 0)
 goto err;
 
-h->max_packet_size = 9968;
-
 return 0;
 
 err:
@@ -190,7 +197,7 @@ static int librist_read(URLContext *h, uint8_t *buf, int 
size)
 if (ret == 0)
 return AVERROR(EAGAIN);
 
-if (data_block->payload_len > 9968) {
+if (data_block->payload_len > MAX_PAYLOAD_SIZE) {
 rist_receiver_data_block_free((struct rist_data_block**)&data_block);
 return AVERROR_EXTERNAL;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avformat/librist: simplify secret strlcpy

2021-03-13 Thread Marton Balint
ffmpeg | branch: master | Marton Balint  | Sat Mar  6 22:31:06 
2021 +0100| [7b0832dea8fe266011e2891402e091562edbb6ba] | committer: Marton 
Balint

avformat/librist: simplify secret strlcpy

Signed-off-by: Marton Balint 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b0832dea8fe266011e2891402e091562edbb6ba
---

 libavformat/librist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/librist.c b/libavformat/librist.c
index 3f74521cb4..2fb3162f86 100644
--- a/libavformat/librist.c
+++ b/libavformat/librist.c
@@ -158,7 +158,7 @@ static int librist_open(URLContext *h, const char *uri, int 
flags)
 }
 
 if (s->secret && peer_config->secret[0] == 0)
-av_strlcpy(peer_config->secret, s->secret, FFMIN(RIST_MAX_STRING_SHORT 
- 1, strlen(s->secret)));
+av_strlcpy(peer_config->secret, s->secret, RIST_MAX_STRING_SHORT);
 
 if (s->secret && (s->encryption == 128 || s->encryption == 256))
 peer_config->key_size = s->encryption;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avformat/librist: increase default loglevel

2021-03-13 Thread Marton Balint
ffmpeg | branch: master | Marton Balint  | Sat Mar  6 22:53:21 
2021 +0100| [4217e091fefe540a0aab767e4a0a2454808cb4aa] | committer: Marton 
Balint

avformat/librist: increase default loglevel

Also remove AV_LOG_SIMULATE from the list as it is not used directly, and do
not use panic level on unknown loglevel, but make them warn. Also fix mapping of
NOTICE/INFO/VERBOSE and add documentation about when the option should actually
be used.

Signed-off-by: Marton Balint 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4217e091fefe540a0aab767e4a0a2454808cb4aa
---

 doc/protocols.texi| 4 +++-
 libavformat/librist.c | 9 -
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/doc/protocols.texi b/doc/protocols.texi
index 11005b0849..eaf7b52608 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -718,7 +718,9 @@ Set internal RIST buffer size for retransmission of data.
 Set maximum packet size for sending data. 1316 by default.
 
 @item log_level
-Set loglevel for RIST logging messages.
+Set loglevel for RIST logging messages. You only need to set this if you
+explicitly want to enable debug level messages or packet loss simulation,
+otherwise the regular loglevel is respected.
 
 @item secret
 Set override of encryption secret, by default is unset.
diff --git a/libavformat/librist.c b/libavformat/librist.c
index 2fb3162f86..2296bfa079 100644
--- a/libavformat/librist.c
+++ b/libavformat/librist.c
@@ -64,7 +64,7 @@ static const AVOption librist_options[] = {
 { "advanced",NULL,  0,   
AV_OPT_TYPE_CONST, {.i64=RIST_PROFILE_ADVANCED}, 0, 0, .flags = D|E, "profile" 
},
 { "buffer_size", "set buffer_size", OFFSET(buffer_size), AV_OPT_TYPE_INT,  
 {.i64=0}, 0, INT_MAX, .flags = D|E },
 { "pkt_size","set packet size", OFFSET(packet_size), AV_OPT_TYPE_INT,  
 {.i64=1316},  1, MAX_PAYLOAD_SIZE,.flags = D|E },
-{ "log_level",   "set loglevel",OFFSET(log_level),   AV_OPT_TYPE_INT,  
 {.i64=-1},   -1, INT_MAX, .flags = D|E },
+{ "log_level",   "set loglevel",OFFSET(log_level),   AV_OPT_TYPE_INT,  
 {.i64=RIST_LOG_INFO},-1, INT_MAX, .flags = D|E },
 { "secret", "set encryption secret",OFFSET(secret),  
AV_OPT_TYPE_STRING,{.str=NULL},  0, 0,   .flags = D|E },
 { "encryption","set encryption type",OFFSET(encryption), AV_OPT_TYPE_INT   
,{.i64=0}, 0, INT_MAX, .flags = D|E },
 { NULL }
@@ -87,12 +87,11 @@ static int log_cb(void *arg, enum rist_log_level log_level, 
const char *msg)
 switch (log_level) {
 case RIST_LOG_ERROR:level = AV_LOG_ERROR;   break;
 case RIST_LOG_WARN: level = AV_LOG_WARNING; break;
-case RIST_LOG_NOTICE:   level = AV_LOG_VERBOSE; break;
-case RIST_LOG_INFO: level = AV_LOG_INFO;break;
+case RIST_LOG_NOTICE:   level = AV_LOG_INFO;break;
+case RIST_LOG_INFO: level = AV_LOG_VERBOSE; break;
 case RIST_LOG_DEBUG:level = AV_LOG_DEBUG;   break;
 case RIST_LOG_DISABLE:  level = AV_LOG_QUIET;   break;
-case RIST_LOG_SIMULATE: level = AV_LOG_TRACE;   break;
-default: level = AV_LOG_PANIC;
+default: level = AV_LOG_WARNING;
 }
 
 av_log(arg, level, "%s", msg);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avformat/librist: clarify and limit buffer_size

2021-03-13 Thread Marton Balint
ffmpeg | branch: master | Marton Balint  | Sat Mar  6 23:36:03 
2021 +0100| [5bd1d0f4e7150b76f1a3922aefea507aa8a2dd06] | committer: Marton 
Balint

avformat/librist: clarify and limit buffer_size

As suggested by librist developers.

Signed-off-by: Marton Balint 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5bd1d0f4e7150b76f1a3922aefea507aa8a2dd06
---

 doc/protocols.texi| 4 +++-
 libavformat/librist.c | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/doc/protocols.texi b/doc/protocols.texi
index eaf7b52608..3644fe3dd6 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -712,7 +712,9 @@ This one is default.
 @end table
 
 @item buffer_size
-Set internal RIST buffer size for retransmission of data.
+Set internal RIST buffer size in milliseconds for retransmission of data.
+Default value is 0 which means the librist default (1 sec). Maximum value is 30
+seconds.
 
 @item pkt_size
 Set maximum packet size for sending data. 1316 by default.
diff --git a/libavformat/librist.c b/libavformat/librist.c
index 2296bfa079..01a3f9c122 100644
--- a/libavformat/librist.c
+++ b/libavformat/librist.c
@@ -62,7 +62,7 @@ static const AVOption librist_options[] = {
 { "simple",  NULL,  0,   
AV_OPT_TYPE_CONST, {.i64=RIST_PROFILE_SIMPLE},   0, 0, .flags = D|E, "profile" 
},
 { "main",NULL,  0,   
AV_OPT_TYPE_CONST, {.i64=RIST_PROFILE_MAIN}, 0, 0, .flags = D|E, "profile" 
},
 { "advanced",NULL,  0,   
AV_OPT_TYPE_CONST, {.i64=RIST_PROFILE_ADVANCED}, 0, 0, .flags = D|E, "profile" 
},
-{ "buffer_size", "set buffer_size", OFFSET(buffer_size), AV_OPT_TYPE_INT,  
 {.i64=0}, 0, INT_MAX, .flags = D|E },
+{ "buffer_size", "set buffer_size in ms", OFFSET(buffer_size), 
AV_OPT_TYPE_INT, {.i64=0}, 0, 3, .flags = D|E },
 { "pkt_size","set packet size", OFFSET(packet_size), AV_OPT_TYPE_INT,  
 {.i64=1316},  1, MAX_PAYLOAD_SIZE,.flags = D|E },
 { "log_level",   "set loglevel",OFFSET(log_level),   AV_OPT_TYPE_INT,  
 {.i64=RIST_LOG_INFO},-1, INT_MAX, .flags = D|E },
 { "secret", "set encryption secret",OFFSET(secret),  
AV_OPT_TYPE_STRING,{.str=NULL},  0, 0,   .flags = D|E },

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avformat: add Changelog entry for librist and bump minor

2021-03-13 Thread Marton Balint
ffmpeg | branch: master | Marton Balint  | Sun Mar  7 00:20:15 
2021 +0100| [c281d84b2020aebfa4120c0a2bf645ac8824aff6] | committer: Marton 
Balint

avformat: add Changelog entry for librist and bump minor

Signed-off-by: Marton Balint 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c281d84b2020aebfa4120c0a2bf645ac8824aff6
---

 Changelog | 1 +
 libavformat/version.h | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Changelog b/Changelog
index 73deaf6b0f..a96e350e09 100644
--- a/Changelog
+++ b/Changelog
@@ -82,6 +82,7 @@ version :
 - identity video filter
 - msad video filter
 - gophers protocol
+- RIST protocol via librist
 
 
 version 4.3:
diff --git a/libavformat/version.h b/libavformat/version.h
index 6f55726afd..e43754b069 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -32,7 +32,7 @@
 // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
 // Also please add any ticket numbers that you believe might be affected here
 #define LIBAVFORMAT_VERSION_MAJOR  58
-#define LIBAVFORMAT_VERSION_MINOR  73
+#define LIBAVFORMAT_VERSION_MINOR  74
 #define LIBAVFORMAT_VERSION_MICRO 100
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avcodec/exr: Check col/line for integer overflow

2021-03-13 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon 
Feb  1 21:24:50 2021 +0100| [312bcdbfc13227de9e4c3f9e38541b05c84a0639] | 
committer: Michael Niedermayer

avcodec/exr: Check col/line for integer overflow

Fixes: signed integer overflow: -2272 + -2147483360 cannot be represented in 
type 'int'
Fixes: 
30009/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5005660322398208

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=312bcdbfc13227de9e4c3f9e38541b05c84a0639
---

 libavcodec/exr.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 8a714c1a3a..279cfe9412 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -1214,6 +1214,11 @@ static int decode_block(AVCodecContext *avctx, void 
*tdata,
 return AVERROR_PATCHWELCOME;
 }
 
+if (tile_x && s->tile_attr.xSize + (int64_t)FFMAX(s->xmin, 0) >= 
INT_MAX / tile_x )
+return AVERROR_INVALIDDATA;
+if (tile_y && s->tile_attr.ySize + (int64_t)FFMAX(s->ymin, 0) >= 
INT_MAX / tile_y )
+return AVERROR_INVALIDDATA;
+
 line = s->ymin + s->tile_attr.ySize * tile_y;
 col = s->tile_attr.xSize * tile_x;
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avcodec/ffv1dec: Check if trailer is available

2021-03-13 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Jan 31 21:22:11 2021 +0100| [36ad2f41e30ad9f2a8ead76e0b1526b9712f0925] | 
committer: Michael Niedermayer

avcodec/ffv1dec: Check if trailer is available

Fixes: out of array read
Fixes: 
29750/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-4808377272238080.fuzz

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=36ad2f41e30ad9f2a8ead76e0b1526b9712f0925
---

 libavcodec/ffv1dec.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 0a3f425493..8516fef5d7 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -888,8 +888,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, 
int *got_frame, AVPac
 int trailer = 3 + 5*!!f->ec;
 int v;
 
-if (i || f->version > 2) v = AV_RB24(buf_p-trailer) + trailer;
-else v = buf_p - c->bytestream_start;
+if (i || f->version > 2) {
+if (trailer > buf_p - buf) v = INT_MAX;
+else   v = AV_RB24(buf_p-trailer) + trailer;
+} else v = buf_p - c->bytestream_start;
 if (buf_p - c->bytestream_start < v) {
 av_log(avctx, AV_LOG_ERROR, "Slice pointer chain broken\n");
 ff_thread_report_progress(&f->picture, INT_MAX, 0);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avformat/aaxdec: Check that segments table has been initialized

2021-03-13 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Jan 31 22:05:18 2021 +0100| [4e7dbca74c1395082947bb1586c1da47f50b1d18] | 
committer: Michael Niedermayer

avformat/aaxdec: Check that segments table has been initialized

Fixes: Timeout
Fixes: 
29766/clusterfuzz-testcase-minimized-ffmpeg_dem_AAX_fuzzer-5635887566290944

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4e7dbca74c1395082947bb1586c1da47f50b1d18
---

 libavformat/aaxdec.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/libavformat/aaxdec.c b/libavformat/aaxdec.c
index 7d10e805ca..c6d2d1c8d1 100644
--- a/libavformat/aaxdec.c
+++ b/libavformat/aaxdec.c
@@ -264,6 +264,11 @@ static int aax_read_header(AVFormatContext *s)
 }
 }
 
+if (!a->segments[0].end) {
+ret = AVERROR_INVALIDDATA;
+goto fail;
+}
+
 st = avformat_new_stream(s, NULL);
 if (!st) {
 ret = AVERROR(ENOMEM);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avcodec/flacdec: Avoid undefined shift in error case

2021-03-13 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue 
Mar  9 00:55:38 2021 +0100| [bd525e2876bef428e896b8da5e5b5507451f4ed5] | 
committer: Michael Niedermayer

avcodec/flacdec: Avoid undefined shift in error case

Fixes: flac_1040988

Reported-by: Thomas Guilbert 
Reviewed-by: Thomas Guilbert 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bd525e2876bef428e896b8da5e5b5507451f4ed5
---

 libavcodec/flacdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index cf6128f897..9e55bc1361 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -262,7 +262,7 @@ static int decode_residuals(FLACContext *s, int32_t 
*decoded, int pred_order)
 } else {
 int real_limit = tmp ? (INT_MAX >> tmp) + 2 : INT_MAX;
 for (; i < samples; i++) {
-int v = get_sr_golomb_flac(&gb, tmp, real_limit, 0);
+int v = get_sr_golomb_flac(&gb, tmp, real_limit, 1);
 if (v == 0x8000){
 av_log(s->avctx, AV_LOG_ERROR, "invalid residual\n");
 return AVERROR_INVALIDDATA;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avcodec/h264_metadata_bsf: Check nb_units before accessing the first in h264_metadata_update_fragment()

2021-03-13 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Jan 31 22:36:52 2021 +0100| [0c48c332eeb2866d9353125f701e099c48889463] | 
committer: Michael Niedermayer

avcodec/h264_metadata_bsf: Check nb_units before accessing the first in 
h264_metadata_update_fragment()

Fixes: null pointer dereference
Fixes: 
29835/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_METADATA_fuzzer-4712125383704576

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0c48c332eeb2866d9353125f701e099c48889463
---

 libavcodec/h264_metadata_bsf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c
index c3a63f3578..6e58c0be1d 100644
--- a/libavcodec/h264_metadata_bsf.c
+++ b/libavcodec/h264_metadata_bsf.c
@@ -462,7 +462,7 @@ static int h264_metadata_update_fragment(AVBSFContext *bsf, 
AVPacket *pkt,
 int err, i, has_sps, seek_point;
 
 // If an AUD is present, it must be the first NAL unit.
-if (au->units[0].type == H264_NAL_AUD) {
+if (au->nb_units && au->units[0].type == H264_NAL_AUD) {
 if (ctx->aud == BSF_ELEMENT_REMOVE)
 ff_cbs_delete_unit(au, 0);
 } else {

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avformat/cinedec: Fix index_entries size check

2021-03-13 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sun 
Jan 31 22:42:54 2021 +0100| [09b304035423409ce18d731995fa3b921d54f9b5] | 
committer: Michael Niedermayer

avformat/cinedec: Fix index_entries size check

Fixes: out of array access
Fixes: 
29868/clusterfuzz-testcase-minimized-ffmpeg_dem_CINE_fuzzer-5692001957445632

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=09b304035423409ce18d731995fa3b921d54f9b5
---

 libavformat/cinedec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/cinedec.c b/libavformat/cinedec.c
index c6c0d927ee..e5c6468c39 100644
--- a/libavformat/cinedec.c
+++ b/libavformat/cinedec.c
@@ -288,7 +288,7 @@ static int cine_read_packet(AVFormatContext *avctx, 
AVPacket *pkt)
 AVIOContext *pb = avctx->pb;
 int n, size, ret;
 
-if (cine->pts >= st->duration)
+if (cine->pts >= st->internal->nb_index_entries)
 return AVERROR_EOF;
 
 avio_seek(pb, st->internal->index_entries[cine->pts].pos, SEEK_SET);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".