mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-07 09:41:32 +08:00
implement new grabbing interface, as described here:
ttp://thread.gmane.org/gmane.comp.video.ffmpeg.devel/42920 patch by Ramiro Polla % ramiro A lisha P ufsc P br % Original thread: Date: Jan 31, 2007 8:56 PM Subject: [Ffmpeg-devel] [PATCH] New grabbing interface Originally committed as revision 7983 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:

committed by
Guillaume Poirier

parent
2012121363
commit
cc58300e30
@@ -68,7 +68,6 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
|
||||
struct video_tuner tuner;
|
||||
struct video_audio audio;
|
||||
struct video_picture pict;
|
||||
const char *video_device;
|
||||
int j;
|
||||
|
||||
if (ap->width <= 0 || ap->height <= 0 || ap->time_base.den <= 0) {
|
||||
@@ -100,12 +99,9 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
|
||||
s->frame_rate = frame_rate;
|
||||
s->frame_rate_base = frame_rate_base;
|
||||
|
||||
video_device = ap->device;
|
||||
if (!video_device)
|
||||
video_device = "/dev/video";
|
||||
video_fd = open(video_device, O_RDWR);
|
||||
video_fd = open(s1->filename, O_RDWR);
|
||||
if (video_fd < 0) {
|
||||
perror(video_device);
|
||||
perror(s1->filename);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user