summaryrefslogtreecommitdiff
blob: f73506260ef28ba87f7ea5feb1dcfbebfc7df263 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff -ur a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
--- a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp	2011-03-13 17:47:36.000000000 +0100
+++ b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp	2011-07-02 21:40:28.026996093 +0200
@@ -356,8 +356,12 @@
 
     int bytes = 0;    
     // no idea why avcodec_decode_video wants a non-const input...
-    avcodec_decode_video(_videoCodecCtx->getContext(), frame, &bytes,
-            input, input_size);
+    AVPacket pkt;
+    av_init_packet(&pkt);
+    pkt.data = (uint8_t*) input;
+    pkt.size = input_size;
+    avcodec_decode_video2(_videoCodecCtx->getContext(), frame, &bytes,
+            &pkt);
     
     if (!bytes) {
         log_error("Decoding of a video frame failed");