]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libopenh264dec.c
avformat/mov.: Make the process of uuid-xmp atom faster.
[ffmpeg] / libavcodec / libopenh264dec.c
index 6af60af434c5250faf9fbae7f3c1d0df62e7ade0..26cc8db9d16eea4e84846dba920d9d6aefe108da 100644 (file)
@@ -72,15 +72,12 @@ static av_cold int svc_decode_init(AVCodecContext *avctx)
         return err;
 
     s->packet_fifo = av_fifo_alloc(sizeof(AVPacket));
-    if (!s->packet_fifo) {
-        err = AVERROR(ENOMEM);
-        goto fail;
-    }
+    if (!s->packet_fifo)
+        return AVERROR(ENOMEM);
 
     if (WelsCreateDecoder(&s->decoder)) {
         av_log(avctx, AV_LOG_ERROR, "Unable to create decoder\n");
-        err = AVERROR_UNKNOWN;
-        goto fail;
+        return AVERROR_UNKNOWN;
     }
 
     // Pass all libopenh264 messages to our callback, to allow ourselves to filter them.
@@ -98,14 +95,12 @@ static av_cold int svc_decode_init(AVCodecContext *avctx)
 
     if ((*s->decoder)->Initialize(s->decoder, &param) != cmResultSuccess) {
         av_log(avctx, AV_LOG_ERROR, "Initialize failed\n");
-        err = AVERROR_UNKNOWN;
-        goto fail;
+        return AVERROR_UNKNOWN;
     }
 
     avctx->pix_fmt = AV_PIX_FMT_YUV420P;
 
-fail:
-    return err;
+    return 0;
 }
 
 static int init_bsf(AVCodecContext *avctx)
@@ -221,7 +216,11 @@ static int svc_decode_frame(AVCodecContext *avctx, void *data,
 
         avframe->pts     = s->pkt_filtered.pts;
         avframe->pkt_dts = s->pkt_filtered.dts;
+#if FF_API_PKT_PTS
+FF_DISABLE_DEPRECATION_WARNINGS
         avframe->pkt_pts = s->pkt_filtered.pts;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
 
         *got_frame = 1;
     }