Re: [libav-devel] [PATCH] libopenh264dec: Export the decoded profile and level in AVCodecContext

2018-08-31 Thread Martin Storsjö

On Fri, 31 Aug 2018, Vittorio Giovara wrote:


On Fri, Aug 31, 2018 at 11:25 AM, Martin Storsjö  wrote:


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

diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c
index 5990a72ff9..7e9e66743a 100644
--- a/libavcodec/libopenh264dec.c
+++ b/libavcodec/libopenh264dec.c
@@ -95,6 +95,7 @@ static int svc_decode_frame(AVCodecContext *avctx, void
*data,
 int linesize[3];
 AVFrame *avframe = data;
 DECODING_STATE state;
+int opt;

 if (!avpkt->data) {
 #if OPENH264_VER_AT_LEAST(1, 9)
@@ -136,6 +137,10 @@ FF_DISABLE_DEPRECATION_WARNINGS
 avframe->pkt_pts = avpkt->pts;
 FF_ENABLE_DEPRECATION_WARNINGS
 #endif
+(*s->decoder)->GetOption(s->decoder, DECODER_OPTION_PROFILE, );
+avctx->profile = opt;
+(*s->decoder)->GetOption(s->decoder, DECODER_OPTION_LEVEL, );
+avctx->level = opt;

 *got_frame = 1;
 return avpkt->size;
--



lgtm


Thanks - pushed with appropriate openh264 version ifdefs added.

// Martin
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH] libopenh264dec: Export the decoded profile and level in AVCodecContext

2018-08-31 Thread Vittorio Giovara
On Fri, Aug 31, 2018 at 11:25 AM, Martin Storsjö  wrote:

> ---
>  libavcodec/libopenh264dec.c | 5 +
>  1 file changed, 5 insertions(+)
>
> diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c
> index 5990a72ff9..7e9e66743a 100644
> --- a/libavcodec/libopenh264dec.c
> +++ b/libavcodec/libopenh264dec.c
> @@ -95,6 +95,7 @@ static int svc_decode_frame(AVCodecContext *avctx, void
> *data,
>  int linesize[3];
>  AVFrame *avframe = data;
>  DECODING_STATE state;
> +int opt;
>
>  if (!avpkt->data) {
>  #if OPENH264_VER_AT_LEAST(1, 9)
> @@ -136,6 +137,10 @@ FF_DISABLE_DEPRECATION_WARNINGS
>  avframe->pkt_pts = avpkt->pts;
>  FF_ENABLE_DEPRECATION_WARNINGS
>  #endif
> +(*s->decoder)->GetOption(s->decoder, DECODER_OPTION_PROFILE, );
> +avctx->profile = opt;
> +(*s->decoder)->GetOption(s->decoder, DECODER_OPTION_LEVEL, );
> +avctx->level = opt;
>
>  *got_frame = 1;
>  return avpkt->size;
> --
>

lgtm
-- 
Vittorio
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 1/2] network: Add RFC 8305 style "Happy Eyeballs"/"Fast Fallback" helper function

2018-08-31 Thread Martin Storsjö

On Wed, 22 Aug 2018, Luca Barbato wrote:


On 21/08/2018 09:29, Martin Storsjö wrote:

For cases with dual stack (IPv4 + IPv6) connectivity, but where one
stack potentially is less reliable, strive to trying to connect over
both protocols in parallel, using whichever address connected first.

In cases with a hostname resolving to multiple IPv4 and IPv6
addresses, the current connection mechanism would try all addresses
in the order returned by getaddrinfo (with all IPv6 addresses ordered
before the IPv4 addresses normally). If connection attempts to the
IPv6 addresses return quickly with an error, this was no problem, but
if they were unsuccessful leading up to timeouts, the connection process
would have to wait for timeouts on all IPv6 target addresses before
attempting any IPv4 address.

Similar to what RFC 8305 suggests, reorder the list of addresses to
try connecting to, interleaving address families. After starting one
connection attempt, start another one in parallel after a small delay
(200 ms as suggested by the RFC).

For cases with unreliable IPv6 but reliable IPv4, this should make
connection attempts work as reliably as with plain IPv4, with only an
extra 200 ms of connection delay.


The set looks fine to me.


Pushed.

// Martin
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

[libav-devel] [PATCH] libopenh264dec: Export the decoded profile and level in AVCodecContext

2018-08-31 Thread Martin Storsjö
---
 libavcodec/libopenh264dec.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c
index 5990a72ff9..7e9e66743a 100644
--- a/libavcodec/libopenh264dec.c
+++ b/libavcodec/libopenh264dec.c
@@ -95,6 +95,7 @@ static int svc_decode_frame(AVCodecContext *avctx, void *data,
 int linesize[3];
 AVFrame *avframe = data;
 DECODING_STATE state;
+int opt;
 
 if (!avpkt->data) {
 #if OPENH264_VER_AT_LEAST(1, 9)
@@ -136,6 +137,10 @@ FF_DISABLE_DEPRECATION_WARNINGS
 avframe->pkt_pts = avpkt->pts;
 FF_ENABLE_DEPRECATION_WARNINGS
 #endif
+(*s->decoder)->GetOption(s->decoder, DECODER_OPTION_PROFILE, );
+avctx->profile = opt;
+(*s->decoder)->GetOption(s->decoder, DECODER_OPTION_LEVEL, );
+avctx->level = opt;
 
 *got_frame = 1;
 return avpkt->size;
-- 
2.15.2 (Apple Git-101.1)

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel