Changeset f367feacc7afd5a654fc629b82f590d05fd0ea6a
- Timestamp:
- 05/01/01 17:12:22
(7 years ago)
- Author:
- Sam Hocevar <sam@videolan.org>
- git-committer:
- Sam Hocevar <sam@videolan.org> 988729942 +0000
- git-parent:
[543556379d3748bc9e724cbbcdd4b7c100fca3dc]
- git-author:
- Sam Hocevar <sam@videolan.org> 988729942 +0000
- Message:
- Fixed a remaining buffer overflow in the Gnome interface and applied
the patches to the Gtk+ interface.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r5435563 |
rf367fea |
|
| 5 | 5 | HEAD |
|---|
| 6 | 6 | |
|---|
| | 7 | * Fixed a remaining buffer overflow in the Gnome interface and applied |
|---|
| | 8 | the patches to the Gtk+ interface. |
|---|
| 7 | 9 | * Fixed a segfault in the SPU decoder initialization. |
|---|
| 8 | 10 | * Mandatory step for video output IV and the audio output quality |
|---|
| ra70f8bb |
rf367fea |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 1999, 2000 VideoLAN |
|---|
| 5 | | * $Id: intf_gnome.c,v 1.34 2001/05/01 04:18:18 sam Exp $ |
|---|
| | 5 | * $Id: intf_gnome.c,v 1.35 2001/05/01 15:12:22 sam Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Samuel Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 439 | 439 | void(*pf_toggle )( GtkCheckMenuItem *, gpointer ) ) |
|---|
| 440 | 440 | { |
|---|
| 441 | | #define GNOME_LANGUAGE_MENU_SIZE 64 |
|---|
| 442 | 441 | intf_thread_t * p_intf; |
|---|
| 443 | 442 | GtkWidget * p_menu; |
|---|
| … | … | |
| 446 | 445 | GtkWidget * p_item_active; |
|---|
| 447 | 446 | GSList * p_group; |
|---|
| 448 | | char psz_name[ GNOME_LANGUAGE_MENU_SIZE ]; |
|---|
| | 447 | char psz_name[ GNOME_MENU_LABEL_SIZE ]; |
|---|
| 449 | 448 | gint i_item; |
|---|
| 450 | 449 | gint i; |
|---|
| … | … | |
| 465 | 464 | |
|---|
| 466 | 465 | /* special case for "off" item */ |
|---|
| 467 | | snprintf( psz_name, GNOME_LANGUAGE_MENU_SIZE, "Off" ); |
|---|
| 468 | | psz_name[ GNOME_LANGUAGE_MENU_SIZE - 1 ] = '\0'; |
|---|
| | 466 | snprintf( psz_name, GNOME_MENU_LABEL_SIZE, "Off" ); |
|---|
| | 467 | psz_name[ GNOME_MENU_LABEL_SIZE - 1 ] = '\0'; |
|---|
| 469 | 468 | |
|---|
| 470 | 469 | p_item = gtk_radio_menu_item_new_with_label( p_group, psz_name ); |
|---|
| … | … | |
| 497 | 496 | if( psz_name[0] == '\0' ) |
|---|
| 498 | 497 | { |
|---|
| 499 | | snprintf( psz_name, GNOME_LANGUAGE_MENU_SIZE, |
|---|
| | 498 | snprintf( psz_name, GNOME_MENU_LABEL_SIZE, |
|---|
| 500 | 499 | "Language %d", i_item ); |
|---|
| 501 | | psz_name[ GNOME_LANGUAGE_MENU_SIZE - 1 ] = '\0'; |
|---|
| | 500 | psz_name[ GNOME_MENU_LABEL_SIZE - 1 ] = '\0'; |
|---|
| 502 | 501 | } |
|---|
| 503 | 502 | |
|---|
| … | … | |
| 551 | 550 | void(*pf_toggle)( GtkCheckMenuItem *, gpointer ) ) |
|---|
| 552 | 551 | { |
|---|
| 553 | | #define GNOME_ANGLE_MENU_SIZE 64 |
|---|
| 554 | 552 | intf_thread_t * p_intf; |
|---|
| 555 | | char psz_name[ GNOME_ANGLE_MENU_SIZE ]; |
|---|
| | 553 | char psz_name[ GNOME_MENU_LABEL_SIZE ]; |
|---|
| 556 | 554 | GtkWidget * p_angle_menu; |
|---|
| 557 | 555 | GSList * p_angle_group; |
|---|
| … | … | |
| 576 | 574 | i_angle++ ) |
|---|
| 577 | 575 | { |
|---|
| 578 | | snprintf( psz_name, GNOME_ANGLE_MENU_SIZE, "Angle %d", i_angle + 1 ); |
|---|
| 579 | | psz_name[ GNOME_ANGLE_MENU_SIZE - 1 ] = '\0'; |
|---|
| | 576 | snprintf( psz_name, GNOME_MENU_LABEL_SIZE, "Angle %d", i_angle + 1 ); |
|---|
| | 577 | psz_name[ GNOME_MENU_LABEL_SIZE - 1 ] = '\0'; |
|---|
| 580 | 578 | |
|---|
| 581 | 579 | p_item = gtk_radio_menu_item_new_with_label( p_angle_group, |
|---|
| … | … | |
| 625 | 623 | { |
|---|
| 626 | 624 | intf_thread_t * p_intf; |
|---|
| 627 | | char psz_name[12]; |
|---|
| | 625 | char psz_name[ GNOME_MENU_LABEL_SIZE ]; |
|---|
| 628 | 626 | GtkWidget * p_chapter_menu; |
|---|
| 629 | 627 | GtkWidget * p_chapter_submenu; |
|---|
| … | … | |
| 636 | 634 | gint i_nb; |
|---|
| 637 | 635 | |
|---|
| 638 | | /* cast */ |
|---|
| | 636 | /* Cast */ |
|---|
| 639 | 637 | p_intf = (intf_thread_t*)p_data; |
|---|
| 640 | 638 | |
|---|
| 641 | | /* removes previous menu */ |
|---|
| | 639 | /* Removes previous menu */ |
|---|
| 642 | 640 | gtk_menu_item_remove_submenu( GTK_MENU_ITEM( p_chapter ) ); |
|---|
| 643 | 641 | gtk_widget_set_sensitive( p_chapter, FALSE ); |
|---|
| … | … | |
| 664 | 662 | } |
|---|
| 665 | 663 | |
|---|
| 666 | | snprintf( psz_name, GNOME_ANGLE_MENU_SIZE, |
|---|
| | 664 | snprintf( psz_name, GNOME_MENU_LABEL_SIZE, |
|---|
| 667 | 665 | "%d - %d", i_chapter + 1, i_chapter + 10); |
|---|
| 668 | | psz_name[ GNOME_ANGLE_MENU_SIZE - 1 ] = '\0'; |
|---|
| | 666 | psz_name[ GNOME_MENU_LABEL_SIZE - 1 ] = '\0'; |
|---|
| 669 | 667 | p_menu_item = gtk_menu_item_new_with_label( psz_name ); |
|---|
| 670 | 668 | gtk_widget_show( p_menu_item ); |
|---|
| … | … | |
| 672 | 670 | } |
|---|
| 673 | 671 | |
|---|
| 674 | | snprintf( psz_name, GNOME_ANGLE_MENU_SIZE, |
|---|
| | 672 | snprintf( psz_name, GNOME_MENU_LABEL_SIZE, |
|---|
| 675 | 673 | "Chapter %d", i_chapter + 1 ); |
|---|
| 676 | | psz_name[ GNOME_ANGLE_MENU_SIZE - 1 ] = '\0'; |
|---|
| | 674 | psz_name[ GNOME_MENU_LABEL_SIZE - 1 ] = '\0'; |
|---|
| 677 | 675 | |
|---|
| 678 | 676 | p_item = gtk_radio_menu_item_new_with_label( p_chapter_group, |
|---|
| … | … | |
| 743 | 741 | void(*pf_toggle )( GtkCheckMenuItem *, gpointer ) ) |
|---|
| 744 | 742 | { |
|---|
| 745 | | #define GNOME_TITLE_MENU_SIZE 64 |
|---|
| 746 | 743 | intf_thread_t * p_intf; |
|---|
| 747 | | char psz_name[ GNOME_TITLE_MENU_SIZE ]; |
|---|
| | 744 | char psz_name[ GNOME_MENU_LABEL_SIZE ]; |
|---|
| 748 | 745 | GtkWidget * p_title_menu; |
|---|
| 749 | 746 | GtkWidget * p_title_submenu; |
|---|
| … | … | |
| 792 | 789 | } |
|---|
| 793 | 790 | |
|---|
| 794 | | snprintf( psz_name, GNOME_TITLE_MENU_SIZE, |
|---|
| | 791 | snprintf( psz_name, GNOME_MENU_LABEL_SIZE, |
|---|
| 795 | 792 | "%d - %d", i_title, i_title + 9 ); |
|---|
| 796 | | psz_name[ GNOME_TITLE_MENU_SIZE - 1 ] = '\0'; |
|---|
| | 793 | psz_name[ GNOME_MENU_LABEL_SIZE - 1 ] = '\0'; |
|---|
| 797 | 794 | p_title_menu_item = gtk_menu_item_new_with_label( psz_name ); |
|---|
| 798 | 795 | gtk_widget_show( p_title_menu_item ); |
|---|
| … | … | |
| 800 | 797 | } |
|---|
| 801 | 798 | |
|---|
| 802 | | snprintf( psz_name, GNOME_TITLE_MENU_SIZE, "Title %d (%d)", i_title, |
|---|
| | 799 | snprintf( psz_name, GNOME_MENU_LABEL_SIZE, "Title %d (%d)", i_title, |
|---|
| 803 | 800 | p_intf->p_input->stream.pp_areas[i_title]->i_part_nb ); |
|---|
| 804 | | psz_name[ GNOME_TITLE_MENU_SIZE - 1 ] = '\0'; |
|---|
| | 801 | psz_name[ GNOME_MENU_LABEL_SIZE - 1 ] = '\0'; |
|---|
| 805 | 802 | |
|---|
| 806 | 803 | if( pf_toggle == on_menubar_title_toggle ) |
|---|
| … | … | |
| 851 | 848 | } |
|---|
| 852 | 849 | |
|---|
| 853 | | snprintf( psz_name, GNOME_TITLE_MENU_SIZE, |
|---|
| | 850 | snprintf( psz_name, GNOME_MENU_LABEL_SIZE, |
|---|
| 854 | 851 | "%d - %d", i_chapter + 1, i_chapter + 10 ); |
|---|
| 855 | | psz_name[ GNOME_TITLE_MENU_SIZE - 1 ] = '\0'; |
|---|
| | 852 | psz_name[ GNOME_MENU_LABEL_SIZE - 1 ] = '\0'; |
|---|
| 856 | 853 | p_chapter_menu_item = |
|---|
| 857 | 854 | gtk_menu_item_new_with_label( psz_name ); |
|---|
| … | … | |
| 860 | 857 | } |
|---|
| 861 | 858 | |
|---|
| 862 | | snprintf( psz_name, GNOME_TITLE_MENU_SIZE, |
|---|
| | 859 | snprintf( psz_name, GNOME_MENU_LABEL_SIZE, |
|---|
| 863 | 860 | "Chapter %d", i_chapter + 1 ); |
|---|
| 864 | | psz_name[ GNOME_TITLE_MENU_SIZE - 1 ] = '\0'; |
|---|
| | 861 | psz_name[ GNOME_MENU_LABEL_SIZE - 1 ] = '\0'; |
|---|
| 865 | 862 | |
|---|
| 866 | 863 | p_item = gtk_radio_menu_item_new_with_label( |
|---|
| … | … | |
| 971 | 968 | GnomeTitleMenu( p_intf, p_menubar_menu, on_menubar_title_toggle ); |
|---|
| 972 | 969 | |
|---|
| 973 | | snprintf( psz_title, 5, "%d", |
|---|
| | 970 | snprintf( psz_title, 4, "%d", |
|---|
| 974 | 971 | p_intf->p_input->stream.p_selected_area->i_id ); |
|---|
| 975 | 972 | psz_title[ 4 ] = '\0'; |
|---|
| … | … | |
| 991 | 988 | GnomeChapterMenu( p_intf, p_menubar_menu, on_menubar_chapter_toggle ); |
|---|
| 992 | 989 | |
|---|
| 993 | | snprintf( psz_chapter, 5, "%d", |
|---|
| | 990 | snprintf( psz_chapter, 4, "%d", |
|---|
| 994 | 991 | p_intf->p_input->stream.p_selected_area->i_part ); |
|---|
| 995 | 992 | psz_chapter[ 4 ] = '\0'; |
|---|
| r26300bb |
rf367fea |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 1999, 2000 VideoLAN |
|---|
| 5 | | * $Id: intf_gnome.h,v 1.8 2001/04/22 00:08:26 stef Exp $ |
|---|
| | 5 | * $Id: intf_gnome.h,v 1.9 2001/05/01 15:12:22 sam Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Samuel Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 23 | 23 | |
|---|
| 24 | 24 | /***************************************************************************** |
|---|
| 25 | | * drag'n'drop stuff |
|---|
| | 25 | * Drag'n'drop stuff |
|---|
| 26 | 26 | *****************************************************************************/ |
|---|
| 27 | 27 | #define DROP_ACCEPT_TEXT_URI_LIST 0 |
|---|
| … | … | |
| 29 | 29 | |
|---|
| 30 | 30 | /***************************************************************************** |
|---|
| 31 | | * interface modes |
|---|
| | 31 | * Interface modes |
|---|
| 32 | 32 | *****************************************************************************/ |
|---|
| 33 | 33 | #define FILE_MODE 0 |
|---|
| … | … | |
| 35 | 35 | #define DVD_MODE 2 |
|---|
| 36 | 36 | #define VCD_MODE 3 |
|---|
| | 37 | |
|---|
| | 38 | /***************************************************************************** |
|---|
| | 39 | * String sizes |
|---|
| | 40 | *****************************************************************************/ |
|---|
| | 41 | #define GNOME_MENU_LABEL_SIZE 64 |
|---|
| 37 | 42 | |
|---|
| 38 | 43 | /***************************************************************************** |
|---|
| … | … | |
| 84 | 89 | |
|---|
| 85 | 90 | } intf_sys_t; |
|---|
| | 91 | |
|---|
| rc0138ec |
rf367fea |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 1999, 2000 VideoLAN |
|---|
| 5 | | * $Id: intf_gtk.c,v 1.14 2001/04/27 16:08:26 sam Exp $ |
|---|
| | 5 | * $Id: intf_gtk.c,v 1.15 2001/05/01 15:12:22 sam Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Samuel Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 604 | 604 | { |
|---|
| 605 | 605 | intf_thread_t * p_intf; |
|---|
| 606 | | char psz_name[10]; |
|---|
| | 606 | char psz_name[ GTK_MENU_LABEL_SIZE ]; |
|---|
| 607 | 607 | GtkWidget * p_chapter_menu; |
|---|
| 608 | 608 | GtkWidget * p_item; |
|---|
| … | … | |
| 625 | 625 | == i_chapter + 1 ) ? 1 : 0; |
|---|
| 626 | 626 | |
|---|
| 627 | | sprintf( psz_name, "Chapter %d", i_chapter + 1 ); |
|---|
| | 627 | snprintf( psz_name, GTK_MENU_LABEL_SIZE, |
|---|
| | 628 | "Chapter %d", i_chapter + 1 ); |
|---|
| | 629 | psz_name[ GTK_MENU_LABEL_SIZE - 1 ] = '\0'; |
|---|
| 628 | 630 | |
|---|
| 629 | 631 | p_item = GtkMenuRadioItem( p_chapter_menu, &p_chapter_button_group, |
|---|
| … | … | |
| 658 | 660 | { |
|---|
| 659 | 661 | intf_thread_t * p_intf; |
|---|
| 660 | | char psz_name[10]; |
|---|
| | 662 | char psz_name[ GTK_MENU_LABEL_SIZE ]; |
|---|
| 661 | 663 | GtkWidget * p_title_menu; |
|---|
| 662 | 664 | GtkWidget * p_title_item; |
|---|
| … | … | |
| 683 | 685 | b_active = ( p_intf->p_input->stream.pp_areas[i_title] == |
|---|
| 684 | 686 | p_intf->p_input->stream.p_selected_area ) ? 1 : 0; |
|---|
| 685 | | sprintf( psz_name, "Title %d", i_title ); |
|---|
| | 687 | snprintf( psz_name, GTK_MENU_LABEL_SIZE, "Title %d", i_title ); |
|---|
| | 688 | psz_name[ GTK_MENU_LABEL_SIZE - 1 ] = '\0'; |
|---|
| 686 | 689 | |
|---|
| 687 | 690 | p_title_item = GtkMenuRadioItem( p_title_menu, &p_title_button_group, |
|---|
| … | … | |
| 708 | 711 | == i_chapter + 1 ) ? 1 : 0; |
|---|
| 709 | 712 | |
|---|
| 710 | | sprintf( psz_name, "Chapter %d", i_chapter + 1 ); |
|---|
| | 713 | snprintf( psz_name, GTK_MENU_LABEL_SIZE, |
|---|
| | 714 | "Chapter %d", i_chapter + 1 ); |
|---|
| | 715 | psz_name[ GTK_MENU_LABEL_SIZE - 1 ] = '\0'; |
|---|
| 711 | 716 | |
|---|
| 712 | 717 | p_item = GtkMenuRadioItem( p_chapter_menu, |
|---|
| ra0c1805 |
rf367fea |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 1999, 2000 VideoLAN |
|---|
| 5 | | * $Id: intf_gtk.h,v 1.1 2001/03/15 01:42:20 sam Exp $ |
|---|
| | 5 | * $Id: intf_gtk.h,v 1.2 2001/05/01 15:12:22 sam Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Samuel Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 23 | 23 | |
|---|
| 24 | 24 | /***************************************************************************** |
|---|
| 25 | | * drag'n'drop stuff |
|---|
| | 25 | * Drag'n'drop stuff |
|---|
| 26 | 26 | *****************************************************************************/ |
|---|
| 27 | 27 | #define DROP_ACCEPT_TEXT_URI_LIST 0 |
|---|
| … | … | |
| 29 | 29 | |
|---|
| 30 | 30 | /***************************************************************************** |
|---|
| 31 | | * useful inline function |
|---|
| | 31 | * String sizes |
|---|
| | 32 | *****************************************************************************/ |
|---|
| | 33 | #define GTK_MENU_LABEL_SIZE 64 |
|---|
| | 34 | |
|---|
| | 35 | /***************************************************************************** |
|---|
| | 36 | * Useful inline function |
|---|
| 32 | 37 | ****************************************************************************/ |
|---|
| 33 | 38 | static __inline__ intf_thread_t * GetIntf( GtkWidget *item, char * psz_parent ) |
|---|
| r5435563 |
rf367fea |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 1999, 2000 VideoLAN |
|---|
| 5 | | * $Id: video_parser.c,v 1.83 2001/05/01 12:22:18 sam Exp $ |
|---|
| | 5 | * $Id: video_parser.c,v 1.84 2001/05/01 15:12:22 sam Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 95 | 95 | p_vpar->p_fifo = p_config->decoder_config.p_decoder_fifo; |
|---|
| 96 | 96 | p_vpar->p_config = p_config; |
|---|
| | 97 | p_vpar->p_vout = NULL; |
|---|
| 97 | 98 | |
|---|
| 98 | 99 | /* |
|---|
| r5435563 |
rf367fea |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 1999, 2000 VideoLAN |
|---|
| 5 | | * $Id: vpar_headers.c,v 1.84 2001/05/01 12:22:18 sam Exp $ |
|---|
| | 5 | * $Id: vpar_headers.c,v 1.85 2001/05/01 15:12:22 sam Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 459 | 459 | intf_Msg( "vpar: no vout present, spawning one" ); |
|---|
| 460 | 460 | p_main->p_vout = vout_CreateThread( NULL ); |
|---|
| | 461 | |
|---|
| | 462 | /* Spawning another one for fun */ |
|---|
| | 463 | //vout_CreateThread( NULL ); |
|---|
| 461 | 464 | } |
|---|
| 462 | 465 | |
|---|