Skip to content

Commit

Permalink
Fix build error
Browse files Browse the repository at this point in the history
media_writer.cpp: In member function 'int media_writer::open(const string&, const stream_properties&)':
media_writer.cpp:281:50: error: invalid conversion from 'const AVOutputFormat*' to 'AVOutputFormat*' [-fpermissive]
  281 |         AVOutputFormat *fmt_out = av_guess_format("mp4", NULL, "video/mp4");
      |                                   ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                  |
      |                                                  const AVOutputFormat*
  • Loading branch information
andrey-utkin committed Mar 7, 2024
1 parent dd24897 commit faafcf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/media_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ int media_writer::open(const std::string &path, const stream_properties &propert
AVCodec *codec;

/* Get the output format */
AVOutputFormat *fmt_out = av_guess_format("mp4", NULL, "video/mp4");
const AVOutputFormat *fmt_out = av_guess_format("mp4", NULL, "video/mp4");
if (fmt_out == NULL)
{
bc_log(Error, "media_writer: MP4 output format is not found!");
Expand Down Expand Up @@ -707,4 +707,4 @@ int snapshot_writer::write_frame(AVFrame *rawFrame)

///////////////////////////////////////////////////////////////
// S.K. >> END-OF: Implementation of separated snapshot writer
///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////

0 comments on commit faafcf3

Please sign in to comment.