]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/nuv.c
flvdec: follow packets backward until a valid last timestamp is found
[ffmpeg] / libavformat / nuv.c
index 7c96f05217b0e00b4da013d794e825833bb834c6..21df6d285652a5450912328efd149735bee69cdf 100644 (file)
@@ -163,7 +163,10 @@ static int nuv_header(AVFormatContext *s) {
         vst->codec->height = height;
         vst->codec->bits_per_coded_sample = 10;
         vst->sample_aspect_ratio = av_d2q(aspect * height / width, 10000);
-        vst->r_frame_rate = av_d2q(fps, 60000);
+#if FF_API_R_FRAME_RATE
+        vst->r_frame_rate =
+#endif
+        vst->avg_frame_rate = av_d2q(fps, 60000);
         avpriv_set_pts_info(vst, 32, 1, 1000);
     } else
         ctx->v_id = -1;
@@ -277,7 +280,7 @@ static int nuv_resync(AVFormatContext *s, int64_t pos_limit) {
 
 /**
  * \brief attempts to read a timestamp from stream at the given stream position
- * \return timestamp if successfull and AV_NOPTS_VALUE if failure
+ * \return timestamp if successful and AV_NOPTS_VALUE if failure
  */
 static int64_t nuv_read_dts(AVFormatContext *s, int stream_index,
                             int64_t *ppos, int64_t pos_limit)
@@ -335,11 +338,11 @@ static int64_t nuv_read_dts(AVFormatContext *s, int stream_index,
 
 AVInputFormat ff_nuv_demuxer = {
     .name           = "nuv",
-    .long_name      = NULL_IF_CONFIG_SMALL("NuppelVideo format"),
+    .long_name      = NULL_IF_CONFIG_SMALL("NuppelVideo"),
     .priv_data_size = sizeof(NUVContext),
     .read_probe     = nuv_probe,
     .read_header    = nuv_header,
     .read_packet    = nuv_packet,
     .read_timestamp = nuv_read_dts,
-    .flags = AVFMT_GENERIC_INDEX,
+    .flags          = AVFMT_GENERIC_INDEX,
 };