]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
transcoding: set AVFrame format, width and height, fixes #2763
authorstbenz <benz.st@gmail.com>
Tue, 14 Apr 2015 21:11:26 +0000 (23:11 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 15 Apr 2015 16:17:39 +0000 (18:17 +0200)
ffmpeg 2.6 checks, if format, width and height is set in avcodec_encode_video2 and generates a warning, if they aren't set.

src/plumbing/transcoding.c

index 58371ea53caedc5f86df28868c1c60ab0d4a699d..a8144f5b7cc80d82bc5c14c103ff24d7e35bcfe6 100644 (file)
@@ -1211,7 +1211,11 @@ transcoder_stream_video(transcoder_t *t, transcoder_stream_t *ts, th_pkt_t *pkt)
     transcoder_stream_invalidate(ts);
     goto cleanup;
   }
+
+  vs->vid_enc_frame->format  = octx->pix_fmt;
+  vs->vid_enc_frame->width   = octx->width;
+  vs->vid_enc_frame->height  = octx->height;
+
   vs->vid_enc_frame->pkt_pts = vs->vid_dec_frame->pkt_pts;
   vs->vid_enc_frame->pkt_dts = vs->vid_dec_frame->pkt_dts;