]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
[transcode]: partially revert previous commit (something went really wrong)
authorlekma <lekmalek@gmail.com>
Mon, 12 Sep 2016 16:05:08 +0000 (18:05 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 28 Aug 2017 13:32:48 +0000 (15:32 +0200)
src/transcoding/transcode/video.c

index ad35a01a71472f00c4479ca2d4289e82d3ff7b60..f269db0e5afd89c2f5e1a795c66134339c92ba76 100644 (file)
@@ -213,24 +213,17 @@ tvh_video_context_open(TVHContext *self, TVHOpenPhase phase, AVDictionary **opts
 }
 
 
-static int
-tvh_video_context_decode(TVHContext *self, AVPacket *avpkt)
-{
-    if (avpkt->pts <= self->pts) {
-        tvh_context_log(self, LOG_WARNING,
-                        "Invalid pts (%"PRId64") <= last (%"PRId64"), dropping packet",
-                        avpkt->pts, self->pts);
-        return AVERROR_INVALIDDATA;
-    }
-    self->pts = avpkt->pts;
-    return 0;
-}
-
-
 static int
 tvh_video_context_encode(TVHContext *self, AVFrame *avframe)
 {
     avframe->pts = av_frame_get_best_effort_timestamp(avframe);
+    /*if (avframe->pts <= self->pts) {
+        tvh_context_log(self, LOG_ERR,
+                        "Invalid pts (%"PRId64") <= last (%"PRId64")",
+                        avframe->pts, self->pts);
+        return -1;
+    }
+    self->pts = avframe->pts;*/
     return 0;
 }
 
@@ -313,7 +306,6 @@ tvh_video_context_close(TVHContext *self)
 TVHContextType TVHVideoContext = {
     .media_type = AVMEDIA_TYPE_VIDEO,
     .open       = tvh_video_context_open,
-    .decode     = tvh_video_context_decode,
     .encode     = tvh_video_context_encode,
     .ship       = tvh_video_context_ship,
     .wrap       = tvh_video_context_wrap,