[FFmpeg-cvslog] Merge commit '0b1bd1b2057d41fd0ccba7317911c484a50f9207'
Hendrik Leppkes
git at videolan.org
Fri Nov 18 11:22:54 EET 2016
ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Fri Nov 18 10:20:14 2016 +0100| [d7d6f9c78272949b8b13a52eaa850f0d63842fcf] | committer: Hendrik Leppkes
Merge commit '0b1bd1b2057d41fd0ccba7317911c484a50f9207'
* commit '0b1bd1b2057d41fd0ccba7317911c484a50f9207':
lavd: Drop unneeded av_init_packet()s
Merged-by: Hendrik Leppkes <h.leppkes at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d7d6f9c78272949b8b13a52eaa850f0d63842fcf
---
libavdevice/v4l2.c | 1 -
libavdevice/x11grab.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index ddf331d..ae51d83 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -979,7 +979,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
#endif
int res;
- av_init_packet(pkt);
if ((res = mmap_read_frame(ctx, pkt)) < 0) {
return res;
}
diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c
index 5c8cfc1..65b409f 100644
--- a/libavdevice/x11grab.c
+++ b/libavdevice/x11grab.c
@@ -544,7 +544,6 @@ static int x11grab_read_packet(AVFormatContext *s1, AVPacket *pkt)
s->time_frame += INT64_C(1000000);
} while ((s->time_frame * av_q2d(s->time_base) - curtime) <= 0);
- av_init_packet(pkt);
pkt->data = image->data;
pkt->size = s->frame_size;
pkt->pts = curtime;
======================================================================
diff --cc libavdevice/v4l2.c
index ddf331d,47241e4..ae51d83
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@@ -979,8 -861,7 +979,7 @@@ FF_ENABLE_DEPRECATION_WARNING
#endif
int res;
- av_init_packet(pkt);
- if ((res = mmap_read_frame(s1, pkt)) < 0) {
+ if ((res = mmap_read_frame(ctx, pkt)) < 0) {
return res;
}
diff --cc libavdevice/x11grab.c
index 5c8cfc1,60e2560..65b409f
--- a/libavdevice/x11grab.c
+++ b/libavdevice/x11grab.c
@@@ -539,12 -511,6 +539,11 @@@ static int x11grab_read_packet(AVFormat
nanosleep(&ts, NULL);
}
+ /* Calculate the time of the next frame */
+ do {
+ s->time_frame += INT64_C(1000000);
+ } while ((s->time_frame * av_q2d(s->time_base) - curtime) <= 0);
+
- av_init_packet(pkt);
pkt->data = image->data;
pkt->size = s->frame_size;
pkt->pts = curtime;
More information about the ffmpeg-cvslog
mailing list