Revision 9cc07b6c out-stream-avf.c

View differences:

out-stream-avf.c
10 10
#include "out-stream.h"
11 11
#include "dbg.h"
12 12

  
13
static const char *output_format = "nut";
14
static const char *output_file = "out.nut";
15

  
13 16
static enum CodecID libav_codec_id(uint8_t mytype)
14 17
{
15 18
  switch (mytype) {
......
60 63
  frame_rate_d = data[7] << 8 | data[8];
61 64
  dprintf("Frame size: %dx%d -- Frame rate: %d / %d\n", width, height, frame_rate_n, frame_rate_d);
62 65

  
63
  outfmt = av_guess_format("nut", NULL, NULL);
66
  outfmt = av_guess_format(output_format, NULL, NULL);
64 67
  of = avformat_alloc_context();
65 68
  if (of == NULL) {
66 69
    return NULL;
......
99 102
      return;
100 103
    }
101 104
    av_set_parameters(outctx, NULL);
102
    snprintf(outctx->filename, sizeof(outctx->filename), "%s", "out.nut");
103
    dump_format(outctx, 0, "out.nut", 1);
104
    url_fopen(&outctx->pb, "out.nut", URL_WRONLY);
105
    snprintf(outctx->filename, sizeof(outctx->filename), "%s", output_file);
106
    dump_format(outctx, 0, output_file, 1);
107
    url_fopen(&outctx->pb, output_file, URL_WRONLY);
105 108
    av_write_header(outctx);
106 109
  }
107 110

  

Also available in: Unified diff