]> git.sesse.net Git - ffmpeg/blobdiff - doc/examples/hw_decode.c
avformat/avformat, utils: Make av_find_best_stream const-correct
[ffmpeg] / doc / examples / hw_decode.c
index f3286f472dbc96b7d16aa245a00d2ec214536ea7..096a229c0d2a9934b17ed4641cbbdd91ef5e042d 100644 (file)
@@ -152,7 +152,7 @@ int main(int argc, char *argv[])
     int video_stream, ret;
     AVStream *video = NULL;
     AVCodecContext *decoder_ctx = NULL;
-    AVCodec *decoder = NULL;
+    const AVCodec *decoder = NULL;
     AVPacket packet;
     enum AVHWDeviceType type;
     int i;
@@ -223,7 +223,7 @@ int main(int argc, char *argv[])
     }
 
     /* open the file to dump raw data */
-    output_file = fopen(argv[3], "w+");
+    output_file = fopen(argv[3], "w+b");
 
     /* actual decoding and dump the raw data */
     while (ret >= 0) {