]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/tty.c
rtp: Simplify ff_rtp_get_payload_type
[ffmpeg] / libavformat / tty.c
index ecd3f58c77996a3f3b09d4588036a453dbd90063..58e29463469829e71092abb2d081f4fb67bc8348 100644 (file)
@@ -27,6 +27,7 @@
 #include "libavutil/intreadwrite.h"
 #include "libavutil/avstring.h"
 #include "libavutil/log.h"
+#include "libavutil/dict.h"
 #include "libavutil/opt.h"
 #include "libavutil/parseutils.h"
 #include "avformat.h"
@@ -60,7 +61,7 @@ static int efi_read(AVFormatContext *avctx, uint64_t start_pos)
         return -1; \
     if (avio_read(pb, buf, size) == size) { \
         buf[len] = 0; \
-        av_metadata_set2(&avctx->metadata, name, buf, 0); \
+        av_dict_set(&avctx->metadata, name, buf, 0); \
     }
 
     GET_EFI_META("filename", 12)
@@ -94,23 +95,11 @@ static int read_header(AVFormatContext *avctx,
         av_log(avctx, AV_LOG_ERROR, "Could not parse framerate: %s.\n", s->framerate);
         goto fail;
     }
-#if FF_API_FORMAT_PARAMETERS
-    if (ap->width > 0)
-        width = ap->width;
-    if (ap->height > 0)
-        height = ap->height;
-    if (ap->time_base.num)
-        framerate = (AVRational){ap->time_base.den, ap->time_base.num};
-#endif
     st->codec->width  = width;
     st->codec->height = height;
     av_set_pts_info(st, 60, framerate.den, framerate.num);
 
     /* simulate tty display speed */
-#if FF_API_FORMAT_PARAMETERS
-    if (ap->sample_rate)
-        s->chars_per_frame = ap->sample_rate;
-#endif
     s->chars_per_frame = FFMAX(av_q2d(st->time_base)*s->chars_per_frame, 1);
 
     if (avctx->pb->seekable) {