]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/nuv.c
Cosmetics: Fix comment.
[ffmpeg] / libavformat / nuv.c
index 5d63291868436c067b4ab75a8fccc47f915c1122..607dcdc2015800775fc44e8d54ef36b21bb1d2ec 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "libavutil/intreadwrite.h"
+#include "libavutil/intfloat_readwrite.h"
 #include "avformat.h"
 #include "riff.h"
 
@@ -49,18 +50,18 @@ static int nuv_probe(AVProbeData *p) {
 #define PKTSIZE(s) (s &  0xffffff)
 
 /**
- * \brief read until we found all data needed for decoding
- * \param vst video stream of which to change parameters
- * \param ast video stream of which to change parameters
- * \param myth set if this is a MythTVVideo format file
- * \return 1 if all required codec data was found
+ * @brief read until we found all data needed for decoding
+ * @param vst video stream of which to change parameters
+ * @param ast video stream of which to change parameters
+ * @param myth set if this is a MythTVVideo format file
+ * @return 1 if all required codec data was found
  */
 static int get_codec_data(AVIOContext *pb, AVStream *vst,
                           AVStream *ast, int myth) {
     nuv_frametype frametype;
     if (!vst && !myth)
         return 1; // no codec data needed
-    while (!pb->eof_reached) {
+    while (!url_feof(pb)) {
         int size, subtype;
         frametype = avio_r8(pb);
         switch (frametype) {
@@ -195,7 +196,7 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) {
     uint8_t hdr[HDRSIZE];
     nuv_frametype frametype;
     int ret, size;
-    while (!pb->eof_reached) {
+    while (!url_feof(pb)) {
         int copyhdrsize = ctx->rtjpg_video ? HDRSIZE : 0;
         uint64_t pos = avio_tell(pb);
         ret = avio_read(pb, hdr, HDRSIZE);
@@ -258,13 +259,11 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) {
 }
 
 AVInputFormat ff_nuv_demuxer = {
-    "nuv",
-    NULL_IF_CONFIG_SMALL("NuppelVideo format"),
-    sizeof(NUVContext),
-    nuv_probe,
-    nuv_header,
-    nuv_packet,
-    NULL,
-    NULL,
+    .name           = "nuv",
+    .long_name      = NULL_IF_CONFIG_SMALL("NuppelVideo format"),
+    .priv_data_size = sizeof(NUVContext),
+    .read_probe     = nuv_probe,
+    .read_header    = nuv_header,
+    .read_packet    = nuv_packet,
     .flags = AVFMT_GENERIC_INDEX,
 };